home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-29 | 120.4 KB | 4,881 lines |
- *** ../mh-6.8.2/Patchlevel Wed Aug 25 15:56:06 1993
- --- Patchlevel Tue Nov 30 13:21:56 1993
- ***************
- *** 1 ****
- ! MH.6.8 patch.2
- --- 1 ----
- ! MH.6.8 patch.3
- *** ../mh-6.8.2/conf/config/config.c Wed Aug 25 16:00:37 1993
- --- conf/config/config.c Wed Sep 1 15:29:18 1993
- ***************
- *** 1,6 ****
- /* config.c - master MH configuration file */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: config.c,v 1.9 1992/11/05 16:59:39 jromine Exp $";
- #endif /* lint */
-
- /* @(MHWARNING) */
- --- 1,6 ----
- /* config.c - master MH configuration file */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: config.c,v 1.11 1993/09/01 22:29:10 jromine Exp $";
- #endif /* lint */
-
- /* @(MHWARNING) */
- ***************
- *** 125,130 ****
- --- 125,131 ----
- char *rcvdistcomps = "rcvdistcomps";
- char *replcomps = "replcomps";
- char *usequence = "Unseen-Sequence";
- + char *mhlibdir = "@(MHETCPATH)"; /* NB: this will change */
-
-
- /*
- *** ../mh-6.8.2/conf/config/mts.c Wed Aug 25 16:00:36 1993
- --- conf/config/mts.c Wed Sep 1 13:57:16 1993
- ***************
- *** 1,6 ****
- /* mts.c - definitions for the mail transport system */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mts.c,v 2.18 1993/08/19 23:36:12 jromine Exp $";
- #endif /* lint */
-
- /* LINTLIBRARY */
- --- 1,6 ----
- /* mts.c - definitions for the mail transport system */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mts.c,v 2.19 1993/09/01 20:55:38 jromine Exp jromine $";
- #endif /* lint */
-
- /* LINTLIBRARY */
- ***************
- *** 125,130 ****
- --- 125,131 ----
-
- /* SMTP/POP stuff */
-
- + char *clientname = "";
- char *servers = "localhost \01localnet";
- char *pophost = "";
-
- ***************
- *** 201,206 ****
- --- 202,208 ----
- "sendmail", &sendmail,
- #endif /* SENDMTS */
-
- + "clientname", &clientname,
- "servers", &servers,
- "pophost", &pophost,
-
- *** ../mh-6.8.2/conf/doc/folder.rf Wed Aug 25 16:00:28 1993
- --- conf/doc/folder.rf Fri Aug 27 11:13:56 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: folder.rf,v 1.12 1993/08/19 21:20:51 jromine Exp $
- .SC FOLDER 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: folder.rf,v 1.15 1993/08/27 18:13:47 jromine Exp $
- .SC FOLDER 1
- ***************
- *** 9,10 ****
- --- 9,11 ----
- \%[\-all]
- + \%[\-create] \%[\-nocreate]
- \%[\-print]
- ***************
- *** 43,50 ****
- become the current folder and/or message.
- - If the specified (or default) folder doesn't exist,
- - the user will be queried as to whether the folder should be created.
- - When standard input is not a tty, the folder is
- - created without any query.
- - (This is the easy way to create an empty folder for use later.)
- -
- By comparison,
- --- 44,45 ----
- ***************
- *** 55,56 ****
- --- 50,63 ----
-
- + If the specified (or default) folder doesn't exist,
- + the default action is to query the user
- + as to whether the folder should be created;
- + when standard input is not a tty, the answer to
- + the query is assumed to be \*(lqyes\*(rq.
- +
- + Specifying `\-create' will cause \fIfolder\fP to create
- + new folders without any query.
- + (This is the easy way to create an empty folder for use later.)
- + Specifying `\-nocreate' will
- + cause \fIfolder\fP to exit without creating a non-existant folder.
- + .\"
- .\" note - this doesn't work at present
- ***************
- *** 60,62 ****
- .\" but the folder summary will not be printed.
- -
- .Uh "Multiple Folders"
- --- 67,68 ----
- ***************
- *** 199,200 ****
- --- 205,210 ----
- `\-all' forces `\-header' and `\-total'.
- + .sp
- + There is no way to restore the default behavior
- + (to ask the user whether to create a non-existant folder)
- + after `\-create' or `\-nocreate' is given.
- .En
- *** ../mh-6.8.2/conf/doc/mh-chart.rf Wed Aug 25 16:00:24 1993
- --- conf/doc/mh-chart.rf Tue Oct 26 13:12:49 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-chart.rf,v 2.19 1993/08/20 17:13:30 jromine Exp $
- .if '\*(ZZ'-man' \{\
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-chart.rf,v 2.25 1993/10/26 20:12:45 jromine Exp $
- .if '\*(ZZ'-man' \{\
- ***************
- *** 238,241 ****
- mhn
- ! \%[+folder] \%[msgs] \%[\-part\0number]... \%[\-type\0content]...
- .br
- \%[\-list\0\%[\-headers]\0\%[\-noheaders]
- --- 238,243 ----
- mhn
- ! \%[\%[+folder] \%[msgs] | \%[\-file\0file]]
- .br
- + \%[\-part\0number]... \%[\-type\0content]...
- + .br
- \%[\-list\0\%[\-headers]\0\%[\-noheaders]
- ***************
- *** 250,256 ****
- .br
- ! \%[\-cache\0policy]
- \%[\-check]\0\%[\-nocheck]
- \%[\-ebcdicsafe]\0\%[\-noebcdicsafe]
- \%[\-rfc934mode]\0\%[\-norfc934mode]
- \%[\-verbose]\0\%[\-noverbose]
- \%[\-help]
- --- 252,263 ----
- .br
- ! \%[\-cache] \%[\-nocache] \%[\-rcache\0policy] \%[\-wcache\0policy]
- ! .br
- \%[\-check]\0\%[\-nocheck]
- + .br
- \%[\-ebcdicsafe]\0\%[\-noebcdicsafe]
- + .br
- \%[\-rfc934mode]\0\%[\-norfc934mode]
- + .br
- \%[\-verbose]\0\%[\-noverbose]
- + .br
- \%[\-help]
- *** ../mh-6.8.2/conf/doc/mh-tailor.rf Wed Aug 25 16:00:26 1993
- --- conf/doc/mh-tailor.rf Tue Nov 30 14:06:47 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-tailor.rf,v 2.19 1992/12/02 22:16:12 jromine Exp $
- .SC MH-TAILOR 5
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-tailor.rf,v 2.20 1993/09/01 21:20:56 jromine Exp $
- .SC MH-TAILOR 5
- ***************
- *** 29,31 ****
- This has no equivalent in the \fIMH\fR configuration file.
- ! POP client hosts have this value set to the name of the POP service host.
-
- --- 29,31 ----
- This has no equivalent in the \fIMH\fR configuration file.
- ! POP client hosts should set this value to the name of the POP service host.
-
- ***************
- *** 43,44 ****
- --- 43,59 ----
- .ti -.5i
- + clientname:
- + .br
- + The host name \fIMH\fP will give in the
- + SMTP \fBHELO\fP (and \fBEHLO\fP) command, when posting mail.
- + If not set, no \fBHELO\fP command will be given.
- + Although the \fBHELO\fP command is required by RFC 821,
- + many SMTP servers do not require it.
- + .sp
- + Early versions of SendMail will fail if the host name
- + given in the \fBHELO\fP command is the local host;
- + later versions of SendMail will complain if you omit the
- + \fBHELO\fP command. If you run SendMail, find out what
- + your system expects and set this field accordingly.
- +
- + .ti -.5i
- systemname:
- ***************
- *** 338,339 ****
- --- 353,355 ----
- .in -.5i
- + .if n .ne 8
- .Uh "BBoards & The NNTP"
- *** ../mh-6.8.2/conf/doc/mhn.rf Wed Aug 25 16:00:13 1993
- --- conf/doc/mhn.rf Tue Oct 26 13:13:03 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhn.rf,v 1.9 1993/08/20 15:42:08 jromine Exp $
- .SC MHN 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhn.rf,v 1.14 1993/10/26 20:12:56 jromine Exp $
- .SC MHN 1
- ***************
- *** 7,10 ****
- mhn
- ! \%[+folder] \%[msgs] \%[\-part\0number]... \%[\-type\0content]...
- .br
- \%[\-list\0\%[\-headers]\0\%[\-noheaders]
- --- 7,12 ----
- mhn
- ! \%[\%[+folder] \%[msgs] | \%[\-file\0file]]
- .br
- + \%[\-part\0number]... \%[\-type\0content]...
- + .br
- \%[\-list\0\%[\-headers]\0\%[\-noheaders]
- ***************
- *** 19,21 ****
- .br
- ! \%[\-cache\0policy]
- .br
- --- 21,23 ----
- .br
- ! \%[\-cache] \%[\-nocache] \%[\-rcache\0policy] \%[\-wcache\0policy]
- .br
- ***************
- *** 32,37 ****
- The \fImhn\fR command manipulates multi-media messages as specified in
- ! RFC 1341.
-
- ! Three action switches direct the operation of \fImhn\fR,
- ! namely `\-list', `\-show', and `\-store'.
- Any of these switches may be used concurrently.
- --- 34,39 ----
- The \fImhn\fR command manipulates multi-media messages as specified in
- ! RFC 1521.
-
- ! Four action switches direct the operation of \fImhn\fR,
- ! namely `\-list', `\-show', `\-store', and `-cache'.
- Any of these switches may be used concurrently.
- ***************
- *** 58,60 ****
- The initial list of \*(lqstandard\*(rq content types and subtypes can be found
- ! in RFC 1341.
- .ne 18
- --- 60,62 ----
- The initial list of \*(lqstandard\*(rq content types and subtypes can be found
- ! in RFC 1521.
- .ne 18
- ***************
- *** 67,69 ****
- ---- --------
- ! text plain, richtext
- multipart mixed, alternative, digest, parallel
- --- 69,71 ----
- ---- --------
- ! text plain
- multipart mixed, alternative, digest, parallel
- ***************
- *** 90,92 ****
- Note that regardless of the values given to the `\-type' switch,
- ! a multipart content is always acted upon.
- Further note that if the `\-type' switch is used,
- --- 92,94 ----
- Note that regardless of the values given to the `\-type' switch,
- ! a multipart content (of any subtype listed above) is always acted upon.
- Further note that if the `\-type' switch is used,
- ***************
- *** 100,101 ****
- --- 102,112 ----
-
- + The option `\-file\ file' directs \fImhn\fR to use the specified
- + file as the source message, rather than a message from
- + a folder.
- + Note that the file should be a validly formatted message,
- + just like any other \fIMH\fR message.
- + It should \fBNOT\fR be in mail drop format
- + (to convert a file in mail drop format to a folder of \fIMH\fR messages,
- + see \fIinc\fR\0(1)).
- +
- .Uh "Listing the Contents"
- ***************
- *** 134,135 ****
- --- 145,147 ----
- %s subtype
- + %d content description
- .re
- ***************
- *** 152,153 ****
- --- 164,172 ----
-
- + Note that if the content being displayed is multipart,
- + but not one of the subtypes listed above,
- + then the f- and F-escapes expand to multiple filenames,
- + one for each subordinate content.
- + Further,
- + stdin is not redirected from the terminal to the content.
- +
- First,
- ***************
- *** 262,264 ****
- current message have terminated.
- ! In the case of a multipart content,
- the content contains advice indicating if the parts should be
- --- 281,283 ----
- current message have terminated.
- ! In the case of a multipart content (of any subtype listed above),
- the content contains advice indicating if the parts should be
- ***************
- *** 278,279 ****
- --- 297,299 ----
- profile entry,
- + .ne 6
- e.g.,
- ***************
- *** 304,306 ****
- .sp
- ! If the content isn't part of a multipart content,
- the p-escapes are ignored.
- --- 324,326 ----
- .sp
- ! If the content isn't part of a multipart (of any subtype listed above) content,
- the p-escapes are ignored.
- ***************
- *** 405,407 ****
- .sp
- ! If your system supports a SOCKETs interface to TCP/IP,
- then \fImhn\fR will use a built-in FTP client.
- --- 425,428 ----
- .sp
- ! For the \*(lqanon-ftp\*(rq and \*(lqftp\*(rq access types,
- ! if your system supports a SOCKETs interface to TCP/IP,
- then \fImhn\fR will use a built-in FTP client.
- ***************
- *** 409,410 ****
- --- 430,432 ----
- \fImhn\fR will look for the \fBmhn-access-ftp\fR profile entry,
- + .ne 6
- e.g.,
- ***************
- *** 432,434 ****
- The program should terminate with a zero-valued exit-status if the
- ! retrieval is success.
-
- --- 454,456 ----
- The program should terminate with a zero-valued exit-status if the
- ! retrieval is successful.
-
- ***************
- *** 438,448 ****
- and if the content allows caching,
- ! then \fImhn\fR looks for the profile entry \fBmhn-cache\fR to
- ! determine if the content should be read from/written to a cache.
- ! Any content written to the cache will,
- ! by default,
- ! be world-readable.
- ! (To prevent this,
- ! use a directory name with the desired read and execute permissions.)
- ! The \fBmhn-cache\fR profile entry names the directory used for caching,
- ! e.g.,
- .sp
- --- 460,491 ----
- and if the content allows caching,
- ! then depending on the caching behavior of \fImhn\fR,
- ! the content might be read from or written to a cache.
- !
- ! The caching behavior of \fImhn\fR is controlled with
- ! the `\-rcache' and `\-wcache' switches,
- ! which define the policy for reading from,
- ! and writing to,
- ! the cache, respectively.
- ! One of four policies may be specified:
- ! \*(lqpublic\*(rq,
- ! indicating that \fImhn\fR should make use of a
- ! publically-accessible content cache;
- ! \*(lqprivate\*(rq,
- ! indicating that \fImhn\fR should make use of the user's
- ! private content cache;
- ! \*(lqnever\*(rq,
- ! indicating that \fImhn\fR should never make use of caching;
- ! and,
- ! \*(lqask\*(rq,
- ! indicating that \fImhn\fR should ask the user.
- !
- ! There are two directories where contents may be cached:
- ! the profile entry \fBmhn-cache\fR names a directory containing
- ! world-readable contents,
- ! and,
- ! the profile entry \fBmhn-private-cache\fR names a directory containing
- ! private contents.
- ! The former should be an absolute (rooted) directory name.
- ! .ne 6
- ! For example,
- .sp
- ***************
- *** 454,463 ****
- of the system.
-
- ! The caching behavior of \fImhn\fR is controlled with the `\-cache' switch.
- ! One of three arguments may be specified:
- ! always, indicating that \fImhn\fR should make use of caching whenever possible;
- ! ask, indicating that \fImhn\fR should ask the user;
- ! and,
- ! never, indicating that \fImhn\fR should never make use of caching.
-
- .Uh "Composing the Contents"
- --- 497,561 ----
- of the system.
- + The latter is interpreted relative to the user's MH directory,
- + if not rooted,
- + .ne 6
- + e.g.,
- + .sp
- + .in +.5i
- + mhn-private-cache: .cache
- + .in -.5i
- + .sp
- + (which is the default value).
-
- ! .Uh "Caching the Contents"
- ! When you encounter a content of type message/external-body with access type
- ! \*(lqmail-server\*(rq,
- ! \fImhn\fR will ask you if may send a message to a mail-server
- ! requesting the content,
- ! .ne 14
- ! e.g.,
- ! .sp
- ! .nf
- ! .in +.5i
- ! % show 1
- ! Retrieve content by asking mail-server@...
-
- + SEND file
- +
- + ? yes
- + mhn: request sent
- + .in -.5i
- + .fi
- + .sp
- + Regardless of your decision,
- + \fImhn\fR can't perform any other processing on the content.
- +
- + However,
- + if \fImhn\fR is allowed to request the content,
- + then when it arrives,
- + there should be a top-level \*(lqContent-ID:\*(rq field which
- + corresponds to the value in the original message/external-body content.
- + You should now use the `-cache' switch to tell \fImhn\fR to enter the
- + arriving content into the content cache,
- + .ne 8
- + e.g.,
- + .sp
- + .nf
- + .in +.5i
- + % mhn -cache 2
- + caching message 2 as file ...
- + .in -.5i
- + .fi
- + .sp
- + You can then re-process the original message/external-body content,
- + and \*(lqthe right thing should happen\*(rq,
- + .ne 8
- + e.g.,
- + .sp
- + .nf
- + .in +.5i
- + % show 1
- + \0...
- + .in -.5i
- + .fi
- +
- .Uh "Composing the Contents"
- ***************
- *** 469,471 ****
-
- ! .ne 54
- The syntax of this is straight-forward:
- --- 567,569 ----
-
- ! .ne 59
- The syntax of this is straight-forward:
- ***************
- *** 481,482 ****
- --- 579,581 ----
- [ "(" comment ")" ]
- + [ "<" id ">" ]
- [ "[" description "]" ]
- ***************
- *** 488,489 ****
- --- 587,589 ----
- [ "(" comment ")" ]
- + [ "<" id ">" ]
- [ "[" description "]" ]
- ***************
- *** 493,494 ****
- --- 593,595 ----
- | "#forw"
- + [ "<" id ">" ]
- [ "[" description "]" ]
- ***************
- *** 498,499 ****
- --- 599,601 ----
- | "#begin"
- + [ "<" id ">" ]
- [ "[" description "]" ]
- ***************
- *** 500,502 ****
- [ "alternative"
- ! | "parallel" ]
- EOL
- --- 602,605 ----
- [ "alternative"
- ! | "parallel"
- ! | something-else ]
- EOL
- ***************
- *** 539,541 ****
- type=tar; \\
- ! conversions=x-compress
- .in -.5i
- --- 642,644 ----
- type=tar; \\
- ! x-conversions=compress
- .in -.5i
- ***************
- *** 624,626 ****
- type=tar; \\
- ! conversions=x-compress [] \\
- access-type=anon-ftp; \\
- --- 727,729 ----
- type=tar; \\
- ! x-conversions=compress [] \\
- access-type=anon-ftp; \\
- ***************
- *** 635,637 ****
- and the start of the external-parameters is identified.
- ! .ne 16
- These parameters are of the form:
- --- 738,740 ----
- and the start of the external-parameters is identified.
- ! .ne 19
- These parameters are of the form:
- ***************
- *** 685,686 ****
- --- 788,794 ----
- the \*(lq[\*(rq character and the \*(lq]\*(rq character.
- + By default,
- + \fImhn\fR will generate a unique \*(lqContent-ID:\*(rq for each directive;
- + however,
- + the user may override this by defining the ID using the
- + \*(lq<\*(rq and \*(lq>\*(rq characters.
- Putting this all together,
- ***************
- *** 713,714 ****
- --- 821,823 ----
- simply double it,
- + .ne 6
- e.g.,
- ***************
- *** 875,876 ****
- --- 984,986 ----
- then it is interpreted as the number of seconds to pause in between postings,
- + .ne 6
- e.g.,
- ***************
- *** 908,910 ****
- type=tar
- ! conversions=x-compress
- % mhn -show last
- --- 1018,1020 ----
- type=tar
- ! x-conversions=compress
- % mhn -show last
- ***************
- *** 938,940 ****
- type=tar
- ! conversions=x-compress
- % mhn -show last
- --- 1048,1050 ----
- type=tar
- ! x-conversions=compress
- % mhn -show last
- ***************
- *** 978,979 ****
- --- 1088,1090 ----
- \fImhn\fR will attempt to consult one other additional user profile,
- + .ne 6
- e.g.,
- ***************
- *** 999,1001 ****
- .Ps
- ! ^mhn-cache~^Directory to store cached external contents
- .Ps
- --- 1110,1112 ----
- .Ps
- ! ^mhn-cache~^Public directory to store cached external contents
- .Ps
- ***************
- *** 1005,1006 ****
- --- 1116,1119 ----
- .Ps
- + ^mhn-private-cache~^Personal directory to store cached external contents
- + .Ps
- ^mhn-show-<type>*~^Template for displaying contents
- ***************
- *** 1017,1019 ****
- Internet Message Bodies\fR
- ! (RFC 1341),
- .br
- --- 1130,1132 ----
- Internet Message Bodies\fR
- ! (RFC 1521),
- .br
- ***************
- *** 1024,1025 ****
- --- 1137,1140 ----
- .Ds
- + `msgs' defaults to cur
- + .Ds
- `\-noauto'
- ***************
- *** 1026,1028 ****
- .Ds
- ! `\-cache\0ask'
- .Ds
- --- 1141,1143 ----
- .Ds
- ! `\-nocache'
- .Ds
- ***************
- *** 1038,1039 ****
- --- 1153,1156 ----
- .Ds
- + `\-rcache\0ask'
- + .Ds
- `\-realsize'
- ***************
- *** 1047,1048 ****
- --- 1164,1167 ----
- `\-noverbose'
- + .Ds
- + `\-wcache\0ask'
- .Co
- *** ../mh-6.8.2/conf/doc/show.rf Wed Aug 25 16:00:15 1993
- --- conf/doc/show.rf Tue Oct 26 13:09:12 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: show.rf,v 1.7 1992/05/19 21:57:39 jromine Exp $
- .SC SHOW 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: show.rf,v 1.8 1993/10/26 20:09:07 jromine Exp $
- .SC SHOW 1
- ***************
- *** 35,42 ****
-
- ! If you have messages with multi-media content,
- ! you should define the profile entry \fImhnproc\fR,
- ! which is the name of a program to manipulate multi-media messages.
- ! The \fImhn\fR\0(1) program is suitable for this purpose.
- ! Note that if the \fImhnproc\fR profile entry is defined,
- ! the `\-noshowproc' option is NOT specified,
- and if one or more named messages has a multi-media content,
- --- 35,43 ----
-
- ! If you have messages with multi-media contents,
- ! the profile entry \fImhnproc\fR defines the name of a program to
- ! manipulate multi-media messages.
- ! (The \fImhn\fR\0(1) program,
- ! which is suitable for this purpose,
- ! is the default.)
- ! If the `\-noshowproc' option is NOT specified,
- and if one or more named messages has a multi-media content,
- ***************
- *** 46,47 ****
- --- 47,52 ----
- environment variable \fB$NOMHNPROC\fR is set.
- + Note that the \fImhnproc\fR may be invoked even for textual contents,
- + depending on the character set involved.
- + The environment variable $MM_CHARSET should be set to the terminal's
- + character set to avoid gratuitous invocations of the \fImhnproc\fR.
- @END: MIME
- *** ../mh-6.8.2/conf/doc/sortm.rf Wed Aug 25 16:00:15 1993
- --- conf/doc/sortm.rf Fri Aug 27 13:21:30 1993
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: sortm.rf,v 1.8 90/04/05 15:15:26 sources Exp $
- .SC SORTM 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: sortm.rf,v 1.9 1993/08/27 20:21:19 jromine Exp $
- .SC SORTM 1
- ***************
- *** 80,88 ****
-
- ! Previously,
- ! \fIsortm\fR would try to fill any gaps in a folder within the
- ! range of messages it sorted.
- ! To improve performance,
- ! \fIsortm\fR now minimizes the number of message moves.
- ! To pack a folder, use
- ! \*(lq\fIfolder\ \-pack\fR\|\*(rq instead.
- .Bu
- --- 80,88 ----
-
- ! \fISortm\fP sometimes did not preserve the message
- ! numbering in a folder (e.g., messages
- ! 1, 3, and 5, might have been renumbered
- ! to 1, 2, 3 after sorting).
- ! This was a bug, and has been fixed.
- ! To compress the message numbering in a folder, use
- ! \*(lq\fIfolder\ \-pack\fR\|\*(rq as always.
- .Bu
- *** ../mh-6.8.2/conf/examples/aix.sap-ag.de Wed Aug 25 16:00:06 1993
- --- conf/examples/aix.sap-ag.de Thu Sep 2 10:56:44 1993
- ***************
- *** 15,18 ****
- #
- ! options TYPESIG=void SYS5 SYS5DIR SOCKETS
- curses -lcurses
- sprintf int
- --- 15,19 ----
- #
- ! options SYS5 SYS5DIR SOCKETS
- curses -lcurses
- + signal void
- sprintf int
- *** ../mh-6.8.2/conf/examples/aix31.rpi.edu Wed Aug 25 16:00:10 1993
- --- conf/examples/aix31.rpi.edu Thu Sep 2 10:56:55 1993
- ***************
- *** 25,27 ****
- options RPOP SBACKUP='"\\043"' SOCKETS SYS5 SYS5DIR
- ! options TYPESIG='void' TZNAME VSPRINTF YP_LOOKUP
- options AIX AIX3_1 ISI WP NETWORK KPOP TRANSARC_KAS
- --- 25,27 ----
- options RPOP SBACKUP='"\\043"' SOCKETS SYS5 SYS5DIR
- ! options TZNAME VSPRINTF YP_LOOKUP
- options AIX AIX3_1 ISI WP NETWORK KPOP TRANSARC_KAS
- ***************
- *** 35,36 ****
- --- 35,37 ----
- sprintf int
- + signal void
- sharedlib off
- *** ../mh-6.8.2/conf/examples/hpux.sap-ag.de Wed Aug 25 16:00:07 1993
- --- conf/examples/hpux.sap-ag.de Thu Sep 2 10:57:05 1993
- ***************
- *** 16,19 ****
- ccoptions +DA1.0 +DS1.0
- ! options TYPESIG=void SYS5 NDIR SOCKETS _STRINGS
- curses -lcurses -ltermlib
- sprintf int
- --- 16,20 ----
- ccoptions +DA1.0 +DS1.0
- ! options SYS5 NDIR SOCKETS _STRINGS
- curses -lcurses -ltermlib
- + signal void
- sprintf int
- *** ../mh-6.8.2/conf/examples/sun4.0 Wed Aug 25 16:00:02 1993
- --- conf/examples/sun4.0 Thu Sep 2 10:57:29 1993
- ***************
- *** 10,12 ****
- mts sendmail/smtp
- ! options BSD42 BSD43 SUN40 TYPESIG=void
- options DBMPWD
- --- 10,12 ----
- mts sendmail/smtp
- ! options BSD42 BSD43 SUN40
- options DBMPWD
- ***************
- *** 13,14 ****
- --- 13,15 ----
- options BIND
- + signal void
- curses -lcurses -ltermcap
- *** ../mh-6.8.2/conf/examples/sun4.1.1 Wed Aug 25 16:00:06 1993
- --- conf/examples/sun4.1.1 Thu Sep 2 10:57:37 1993
- ***************
- *** 11,13 ****
- options ATTVIBUG BIND BSD42 BSD43 DBMPWD
- ! options LOCKF SUN40 SUN41 TYPESIG=void ZONEINFO
- curses -lcurses -ltermcap
- --- 11,14 ----
- options ATTVIBUG BIND BSD42 BSD43 DBMPWD
- ! options LOCKF SUN40 SUN41 ZONEINFO
- ! signal void
- curses -lcurses -ltermcap
- *** ../mh-6.8.2/conf/examples/sun411.rpi.edu Wed Aug 25 16:00:01 1993
- --- conf/examples/sun411.rpi.edu Thu Sep 2 10:57:47 1993
- ***************
- *** 24,26 ****
- options RPOP KPOP TRANSARC_KAS SBACKUP='"\\043"'
- ! options SUN40 SUN41 TYPESIG='void' TZNAME ZONEINFO
- options ISI WP YP_LOOKUP
- --- 24,26 ----
- options RPOP KPOP TRANSARC_KAS SBACKUP='"\\043"'
- ! options SUN40 SUN41 TZNAME ZONEINFO
- options ISI WP YP_LOOKUP
- ***************
- *** 33,34 ****
- --- 33,35 ----
- sprintf int
- + signal void
- ranlib on
- *** ../mh-6.8.2/conf/examples/ultrix.sap-ag.de Wed Aug 25 16:00:07 1993
- --- conf/examples/ultrix.sap-ag.de Thu Sep 2 10:56:05 1993
- ***************
- *** 15,18 ****
- #
- ! options TYPESIG=void BSD42 BSD43
- curses -lcurses -ltermlib
- #
- --- 15,19 ----
- #
- ! options BSD42 BSD43
- curses -lcurses -ltermlib
- + signal void
- #
- *** ../mh-6.8.2/conf/makefiles/MH-Makefile Wed Aug 25 15:59:51 1993
- --- conf/makefiles/MH-Makefile Fri Aug 27 15:15:52 1993
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: MH-Makefile,v 2.15 1992/12/03 16:23:40 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: MH-Makefile,v 2.16 1993/08/27 22:15:49 jromine Exp $
- ##############################################################################
- ***************
- *** 65,66 ****
- --- 65,67 ----
- ETCDIR = $(DESTDIR)@(MHETCPATH)
- + MANDIR = $(DESTDIR)@(MHMANDIR)
- SLIB = sbr
- ***************
- *** 74,80 ****
-
- ! mkdirs: $(BINDIR) $(ETCDIR)
-
- ! $(BINDIR) $(ETCDIR):
- ! mkdir $@
- ! chmod 0755 $@
-
- --- 75,80 ----
-
- ! mkdirs: $(BINDIR) $(ETCDIR) $(MANDIR)
-
- ! $(BINDIR) $(ETCDIR) $(MANDIR):
- ! mkdir $@ && chmod 0755 $@
-
- *** ../mh-6.8.2/conf/makefiles/doc Wed Aug 25 15:59:54 1993
- --- conf/makefiles/doc Fri Aug 27 15:16:03 1993
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: doc,v 2.25 1993/06/03 17:43:20 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: doc,v 2.26 1993/08/27 22:15:57 jromine Exp $
- ##############################################################################
- ***************
- *** 147,149 ****
-
- ! inst-all: @(MHMANGEN) inst-tmac $(inst-man1) $(inst-man5) $(inst-man8)
-
- --- 147,150 ----
-
- ! inst-all: @(MHMANGEN) mkdirs inst-tmac \
- ! $(inst-man1) $(inst-man5) $(inst-man8)
-
- ***************
- *** 175,176 ****
- --- 176,183 ----
- ##############################################################################
- +
- + mkdirs: $(MANDIR)/$(DIR1) $(MANDIR)/$(DIR5) $(MANDIR)/$(DIR8)
- +
- + $(MANDIR)/$(DIR1) $(MANDIR)/$(DIR5) $(MANDIR)/$(DIR8):
- + -mkdir $@ && chmod 0755 $@
- +
-
- *** ../mh-6.8.2/conf/makefiles/zotnet/tws Wed Aug 25 15:59:55 1993
- --- conf/makefiles/zotnet/tws Sat Sep 4 12:32:39 1993
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: tws,v 1.16 1993/02/26 21:50:51 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: tws,v 1.16 1993/02/26 21:50:51 jromine Exp jromine $
- ##############################################################################
- ***************
- *** 73,76 ****
- $(LEX) dtimep.lex | sed -f lexedit.sed > dtimep.c
- ! len=`wc -l dtimep.c | awk ' { print $$1 } '`; \
- ! if [ $$len -eq 1 ]; then cp dtimep.c-lexed dtimep.c; fi
-
- --- 73,80 ----
- $(LEX) dtimep.lex | sed -f lexedit.sed > dtimep.c
- ! -@len=`wc -l dtimep.c | awk ' { print $$1 } '`; \
- ! if [ $$len -gt 10 ]; \
- ! then exit 0; \
- ! else echo "lex failed: using pre-lexed dtimep.c"; \
- ! cp dtimep.c-lexed dtimep.c; \
- ! fi
-
- *** ../mh-6.8.2/conf/mh-gen.8 Wed Aug 25 15:59:46 1993
- --- conf/mh-gen.8 Tue Nov 30 16:44:29 1993
- ***************
- *** 1,2 ****
- ! .\" @(#)$Id: mh-gen.8,v 2.112 1993/08/25 18:07:10 jromine Exp $
- .\" uneven inter-word spacing (nroff line adjusting) hampers readability
- --- 1,2 ----
- ! .\" @(#)$Id: mh-gen.8,v 2.115 1993/12/01 00:44:23 jromine Exp $
- .\" uneven inter-word spacing (nroff line adjusting) hampers readability
- ***************
- *** 3,5 ****
- .if n .na
- ! .TH MH-GEN 8 MH.6.8.2 [mh.6]
- .SH NAME
- --- 3,5 ----
- .if n .na
- ! .TH MH-GEN 8 MH.6.8.3 [mh.6]
- .SH NAME
- ***************
- *** 1161,1164 ****
- to change your MH configuration. If so, cd back to the \fBconf/\fP
- ! directory, re-edit the file \fBMH\fP, and re-run
- ! \fImhconfig\fP.
- .PP
- --- 1161,1164 ----
- to change your MH configuration. If so, cd back to the \fBconf/\fP
- ! directory, re-edit the files \fBMH\fP
- ! and \fBconf/config/mtstailor\fR, and re-run \fImhconfig\fP.
- .PP
- ***************
- *** 1343,1347 ****
- .SH INSTALLATION
- ! If the directories you chose for the user\-programs and
- ! support\-programs
- ! (\*(lqbin\*(rq and \*(lqetc\*(rq in the \fBconf/MH\fR file)
- don't exist,
- --- 1343,1348 ----
- .SH INSTALLATION
- ! If the directories you chose for the user\-programs,
- ! support\-programs and manuals
- ! (\*(lqbin\*(rq, \*(lqetc\*(rq, \*(lqpopdir\*(rq, \*(lqslibdir\*(rq,
- ! and \*(lqmandir\*(rq in the \fBconf/MH\fR file)
- don't exist,
- *** ../mh-6.8.2/conf/mhconfig.c Wed Aug 25 15:59:45 1993
- --- conf/mhconfig.c Tue Nov 30 14:01:08 1993
- ***************
- *** 1,7 ****
- /* mhconfig.c - configure MH */
- /* cc [-DSYS5] mhconfig.c -o mhconfig */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhconfig.c,v 2.70 1993/08/25 18:07:10 jromine Exp $";
- #endif /* lint */
-
- #include <ctype.h>
- --- 1,7 ----
- /* mhconfig.c - configure MH */
- /* cc [-DSYS5] mhconfig.c -o mhconfig */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhconfig.c,v 2.71 1993/11/30 22:01:04 jromine Exp $";
- #endif /* lint */
-
- #include <ctype.h>
- ***************
- *** 29,35 ****
- #define MAKE "../%s/Makefile"
-
- #define WARNING "This file is automatically generated. Do not edit!"
- ! #define MHRELEASE "6.8.2" /* for version: "Maj.min.pat" */
- #define MHCENTERFOOT "MH.6.8" /* for nroff page footers */
- #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */
- #define MHSLIBVER "3.2" /* SunOS4 shared library version */
- --- 29,35 ----
- #define MAKE "../%s/Makefile"
-
- #define WARNING "This file is automatically generated. Do not edit!"
- ! #define MHRELEASE "6.8.3" /* for version: "Maj.min.pat" */
- #define MHCENTERFOOT "MH.6.8" /* for nroff page footers */
- #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */
- #define MHSLIBVER "3.2" /* SunOS4 shared library version */
- *** ../mh-6.8.2/miscellany/multi-media/READ-ME Wed Aug 25 15:59:09 1993
- --- miscellany/multi-media/READ-ME Wed Sep 1 19:07:33 1993
- ***************
- *** 2,4 ****
-
- ! [ READ-ME - Wed Oct 21 15:35:57 1992 - multi-media MH for MH 6.7 - /mtr ]
-
- --- 2,4 ----
-
- ! [ READ-ME - Wed Sep 1 19:07:25 1993 - multi-media MH - /mtr ]
-
- ***************
- *** 257,268 ****
- can fiddle with the volume controls whenever you like.
- -
- -
- - video
- -
- - If you are running the X window system, you can use the mpeg_play
- - program to display a video/mpeg content.
- -
- - host toe.cs.berkeley.edu
- - dir pub/multimedia/mpeg/
- - file mpeg-2.0.tar.Z
- - mode binary
- --- 257 ----
- *** /dev/null Tue Nov 30 18:53:36 1993
- --- miscellany/multi-media/misc/READ-ME Tue Nov 30 19:33:07 1993
- ***************
- *** 0 ****
- --- 1,15 ----
- + [ READ-ME - Wed Sep 1 19:08:21 1993 - miscellaneous stuff - /mtr ]
- +
- +
- + mimeless
- +
- + This invokes less in a more interesting way to display text/plain
- + contents. In your .mhn_profile, add the line
- +
- + mhn-show-text/plain: mimeless "%d" text/%s '%F'
- +
- +
- + rt2raw.c
- +
- + This is a relly dumb richtext interpeter. The compilation and
- + installation instructions are in miscellany/multi-media/READ-ME.
- *** /dev/null Tue Nov 30 18:53:36 1993
- --- miscellany/multi-media/misc/mimeless Thu Sep 2 21:31:21 1993
- ***************
- *** 0 ****
- --- 1,19 ----
- + #!/bin/sh
- + : mhn-show-text/plain: mimeless "%d" text/%s '%F'
- +
- + if [ $# != 3 ]; then
- + echo "usage: $0 message-1 message-2 file-name" 1>&2
- + exit 1
- + fi
- +
- + if [ ! -r $3 ]; then
- + echo "File does not exist." 1>&2
- + exit 1
- + fi
- +
- + msg1=`echo $1 | sed -e 's/\%/\\\%/g' -e 's/\?/\\\?/g' -e 's/:/\\:/g' \
- + -e 's/\./\\\./g' -e 's/\"/\\\"/g'`
- + msg2=`echo $2 | sed -e 's/\%/\\\%/g' -e 's/\?/\\\?/g' -e 's/:/\\:/g' \
- + -e 's/\./\\\./g' -e 's/\"/\\\"/g'`
- +
- + exec less -P"\"${msg1}\" ${msg2} ?pB%pB\%.%t" $3
- *** ../mh-6.8.2/miscellany/multi-media/profiles/mhn_defaults Wed Aug 25 15:59:11 1993
- --- miscellany/multi-media/profiles/mhn_defaults Tue Sep 7 21:05:07 1993
- ***************
- *** 5,7 ****
- mhn-show-application/x-ivs: %pivs_replay -o '%F'
- ! mhn-show-audio/basic: %p/usr/demo/SOUND/raw2audio 2>/dev/null | play
- mhn-show-audio/x-next: %p/usr/openwin/bin/adpcm_dec | /usr/demo/SOUND/play
- --- 5,7 ----
- mhn-show-application/x-ivs: %pivs_replay -o '%F'
- ! mhn-show-audio/basic: %p/usr/demo/SOUND/raw2audio 2>/dev/null | /usr/demo/SOUND/play
- mhn-show-audio/x-next: %p/usr/openwin/bin/adpcm_dec | /usr/demo/SOUND/play
- *** ../mh-6.8.2/miscellany/multi-media/profiles/mtr.mh_profile Wed Aug 25 15:59:11 1993
- --- miscellany/multi-media/profiles/mtr.mh_profile Tue Sep 7 21:05:02 1993
- ***************
- *** 54,56 ****
- automhnproc: mhn
- ! mhnproc: mhn
- mcomp: -editor rapid -form comp.mhn
- --- 54,56 ----
- automhnproc: mhn
- ! mhnproc: xmhn
- mcomp: -editor rapid -form comp.mhn
- *** ../mh-6.8.2/miscellany/multi-media/profiles/mtr.mhn_profile.openwindows Wed Aug 25 15:59:11 1993
- --- miscellany/multi-media/profiles/mtr.mhn_profile.openwindows Tue Sep 7 21:06:06 1993
- ***************
- *** 1,2 ****
- ! mhn-show-application/PostScript: gs -q -dSAFER -- %F
- ! mhn-store-message/rfc822: %m%P.msg
- --- 1,4 ----
- ! mhn-show-application/PostScript: gs -q -dSAFER -- '%F'
- ! mhn-show-multipart/enabled-mail: %pem_play -generic %F
- ! mhn-show-application/safe-tcl: %pst_play %a '%F'
- ! mhn-show-text/plain: mimeless "%d" text/%s '%F'
- *** ../mh-6.8.2/mts/sendmail/smail.c Wed Aug 25 15:58:24 1993
- --- mts/sendmail/smail.c Tue Nov 30 19:50:36 1993
- ***************
- *** 1,6 ****
- /* smail.c - MH interface to SendMail/SMTP */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: smail.c,v 1.25 1993/08/25 17:17:29 jromine Exp $";
- #endif
-
- /* LINTLIBRARY */
- --- 1,6 ----
- /* smail.c - MH interface to SendMail/SMTP */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: smail.c,v 1.27 1993/12/01 03:50:31 jromine Exp $";
- #endif
-
- /* LINTLIBRARY */
- ***************
- *** 113,119 ****
- static int sm_werror(), smhear(), sm_rrecord(), sm_rerror();
-
- #ifdef MPOP
- ! extern int errno
- #ifndef BSD44
- extern int sys_nerr;
- extern char *sys_errlist[];
- --- 113,119 ----
- static int sm_werror(), smhear(), sm_rrecord(), sm_rerror();
-
- #ifdef MPOP
- ! extern int errno;
- #ifndef BSD44
- extern int sys_nerr;
- extern char *sys_errlist[];
- ***************
- *** 162,167 ****
- --- 162,169 ----
- if (sm_rfp != NULL && sm_wfp != NULL)
- return RP_OK;
-
- + if (client == NULL || *client == '\0')
- + client = clientname;
- #ifdef ZMAILER
- if (client == NULL || *client == '\0')
- client = "localhost";
- ***************
- *** 302,307 ****
- --- 304,311 ----
- if (sm_rfp != NULL && sm_wfp != NULL)
- goto send_options;
-
- + if (client == NULL || *client == '\0')
- + client = clientname;
- #ifdef ZMAILER
- if (client == NULL || *client == '\0')
- client = "localhost";
- *** ../mh-6.8.2/papers/changes/mh-changes.ms Wed Aug 25 15:58:23 1993
- --- papers/changes/mh-changes.ms Tue Nov 30 15:57:38 1993
- ***************
- *** 1,2 ****
- ! .\" @(#)$Id: mh-changes.ms,v 1.27 1993/08/25 18:11:13 jromine Exp $
- .\" Standard -ms macros
- --- 1,2 ----
- ! .\" @(#)$Id: mh-changes.ms,v 1.28 1993/11/30 23:57:26 jromine Exp $
- .\" Standard -ms macros
- ***************
- *** 6,8 ****
- .\" remember to update date in text below
- ! .DA "August 25, 1993"
- .if n \{\
- --- 6,8 ----
- .\" remember to update date in text below
- ! .DA "December 1, 1993"
- .if n \{\
- ***************
- *** 99,103 ****
- .KE
- ! .ds LH Changes for MH 6.8.2
- .bp
- .SH
- CHANGES FOR MH 6.8.2
- --- 99,143 ----
- .KE
- ! .ds LH Changes for MH 6.8.3
- .bp
- + .SH
- + CHANGES FOR MH 6.8.3
- + .LP
- + The MH 6.8.3 maintenance release contains few user-visible
- + changes. Most of the changes are internal to the
- + multi-media display program \fImhn\fP to support
- + RFC 1521 (the new MIME standard).
- + This is the current version of MH as of December 1, 1993.
- + .SH
- + Runtime Tailoring
- + .LP
- + When posting mail using the SMTP,
- + \fIpost\fP does not normally send the \fBHELO\fP command.
- + This is because \fISendMail\fP would fail
- + if the host name given in the \fBHELO\fP command was the local host.
- + Later versions
- + of \fISendMail\fP will now complain if you omit the \fBHELO\fP
- + command.
- + .PP
- + If you specify a hostname with the \fBclientname:\fP option
- + in the \fImtstailor\fP file,
- + \fIpost\fP will give the \fBHELO\fP command with that name,
- + otherwise no \fBHELO\fP command is given.
- + See \fImh-tailor\fP\|(5) for more details.
- .SH
- + User Interface Programs
- + .IP folder \w'msgchk'u+2n
- + The \fIfolder\fP command now has `\-create' and `\-nocreate'
- + options. See \fIfolder\fP\|(1) for details.
- + .IP inc
- + A bug where `\-host' would not override the \fBpophost\fP
- + as set in the \fImtstailor\fP file has been fixed.
- + This bug was also fixed in \fImsgchk\fP.
- + .IP mhn
- + The \fImhn\fP command has several changes:
- + updates for conformance with RFC 1521,
- + addition of two caches: public and private,
- + addition of two caching policies: one for reading and one for writing,
- + support for storing multipart entities, and
- + a few bug fixes. See \fImhn\fP\|(1) for complete details.
- + .SH
- CHANGES FOR MH 6.8.2
- ***************
- *** 110,113 ****
- .NL
- ! This is the current released version of \fIMH\fP
- ! as of August 25, 1993.
- .SH
- --- 150,153 ----
- .NL
- ! This version of \fIMH\fP
- ! was released August 25, 1993, but was not widely distributed.
- .SH
- *** ../mh-6.8.2/sbr/m_getdefs.c Wed Aug 25 15:57:29 1993
- --- sbr/m_getdefs.c Fri Sep 3 10:39:02 1993
- ***************
- *** 1,6 ****
- /* m_getdefs.c - read the user's MH environment */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_getdefs.c,v 1.7 1993/08/25 17:20:41 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* m_getdefs.c - read the user's MH environment */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_getdefs.c,v 1.8 1993/09/03 17:38:51 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 24,31 ****
- #define FOpen(f,m,e,c) fopen (f, m)
- #define FClose(f) fclose (f)
- #else /* OVERHEAD */
- ! FILE *FOpen ();
- ! int FClose ();
-
- off_t lseek ();
- #endif /* OVERHEAD */
- --- 24,31 ----
- #define FOpen(f,m,e,c) fopen (f, m)
- #define FClose(f) fclose (f)
- #else /* OVERHEAD */
- ! static FILE *FOpen ();
- ! static int FClose ();
-
- off_t lseek ();
- #endif /* OVERHEAD */
- *** ../mh-6.8.2/support/general/viamail.sh Wed Aug 25 15:57:05 1993
- --- support/general/viamail.sh Tue Oct 26 09:05:36 1993
- ***************
- *** 1,3 ****
- : run this script through /bin/sh
- ! : '@(#)$Id: viamail.sh,v 1.4 1993/08/20 15:49:19 jromine Exp $'
-
- --- 1,3 ----
- : run this script through /bin/sh
- ! : '@(#)$Id: viamail.sh,v 1.5 1993/10/26 16:05:23 jromine Exp $'
-
- ***************
- *** 30,32 ****
- mhn -viamail "$mailpath" -viasubj "$subject" \
- ! -viaparm "type=tar; x-conversions=x-compress" \
- -viacmnt "extract with uncompress | tar xvpf -" \
- --- 30,32 ----
- mhn -viamail "$mailpath" -viasubj "$subject" \
- ! -viaparm "type=tar; x-conversions=compress" \
- -viacmnt "extract with uncompress | tar xvpf -" \
- *** ../mh-6.8.2/uip/ali.c Wed Aug 25 15:56:29 1993
- --- uip/ali.c Wed Sep 1 17:05:24 1993
- ***************
- *** 1,6 ****
- /* ali.c - the new ali */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: ali.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* ali.c - the new ali */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: ali.c,v 1.9 1993/09/02 00:05:15 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 137,143 ****
- }
-
- if (!noalias) {
- - (void) alias (AliasFile);
- if (cp = m_find ("Aliasfile")) { /* allow Aliasfile: profile entry */
- char *dp = NULL;
-
- --- 137,142 ----
- ***************
- *** 148,153 ****
- --- 147,153 ----
- if (dp)
- free(dp);
- }
- + (void) alias (AliasFile);
- }
-
-
- *** ../mh-6.8.2/uip/dropsbr.c Wed Aug 25 15:56:28 1993
- --- uip/dropsbr.c Fri Aug 27 16:00:11 1993
- ***************
- *** 1,6 ****
- /* dropsbr.c - write to a mailbox */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: dropsbr.c,v 1.16 1993/08/25 17:25:08 jromine Exp $";
- #endif /* lint */
-
- #include <stdio.h>
- --- 1,6 ----
- /* dropsbr.c - write to a mailbox */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: dropsbr.c,v 1.17 1993/08/27 23:00:00 jromine Exp $";
- #endif /* lint */
-
- #include <stdio.h>
- ***************
- *** 534,540 ****
- tdp->d_size = ntohl(tdp->d_size);
- tdp->d_start = ntohl(tdp->d_start);
- tdp->d_stop = ntohl(tdp->d_stop);
- - tdp++;
- }
- #endif
- *drops = dp;
- --- 534,539 ----
- *** ../mh-6.8.2/uip/folder.c Wed Aug 25 15:56:47 1993
- --- uip/folder.c Fri Aug 27 16:23:16 1993
- ***************
- *** 1,6 ****
- /* folder(s).c - report on folders */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: folder.c,v 2.9 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* folder(s).c - report on folders */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: folder.c,v 2.11 1993/08/27 23:23:06 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 19,67 ****
- #define ALLSW 0
- "all", 0,
-
- ! #define FASTSW 1
- "fast", 0,
- ! #define NFASTSW 2
- "nofast", 0,
-
- ! #define HDRSW 3
- "header", 0,
- ! #define NHDRSW 4
- "noheader", 0,
-
- ! #define PACKSW 5
- "pack", 0,
- ! #define NPACKSW 6
- "nopack", 0,
- ! #define VERBSW 7
- "verbose", 0,
- ! #define NVERBSW 8
- "noverbose", 0,
-
- ! #define RECURSW 9
- "recurse", 0,
- ! #define NRECRSW 10
- "norecurse", 0,
-
- ! #define TOTALSW 11
- "total", 0,
- ! #define NTOTLSW 12
- "nototal", 0,
-
- ! #define PRNTSW 13
- "print", 0,
- ! #define NPRNTSW 14
- "noprint", -4,
- ! #define LISTSW 15
- "list", 0,
- ! #define NLISTSW 16
- "nolist", 0,
- ! #define PUSHSW 17
- "push", 0,
- ! #define POPSW 18
- "pop", 0,
-
- ! #define HELPSW 19
- "help", 4,
-
- NULL, 0
- --- 19,72 ----
- #define ALLSW 0
- "all", 0,
-
- ! #define CREATSW 1
- ! "create", 0,
- ! #define NCREATSW 2
- ! "nocreate", 0,
- !
- ! #define FASTSW 3
- "fast", 0,
- ! #define NFASTSW 4
- "nofast", 0,
-
- ! #define HDRSW 5
- "header", 0,
- ! #define NHDRSW 6
- "noheader", 0,
-
- ! #define PACKSW 7
- "pack", 0,
- ! #define NPACKSW 8
- "nopack", 0,
- ! #define VERBSW 9
- "verbose", 0,
- ! #define NVERBSW 10
- "noverbose", 0,
-
- ! #define RECURSW 11
- "recurse", 0,
- ! #define NRECRSW 12
- "norecurse", 0,
-
- ! #define TOTALSW 13
- "total", 0,
- ! #define NTOTLSW 14
- "nototal", 0,
-
- ! #define PRNTSW 15
- "print", 0,
- ! #define NPRNTSW 16
- "noprint", -4,
- ! #define LISTSW 17
- "list", 0,
- ! #define NLISTSW 18
- "nolist", 0,
- ! #define PUSHSW 19
- "push", 0,
- ! #define POPSW 20
- "pop", 0,
-
- ! #define HELPSW 21
- "help", 4,
-
- NULL, 0
- ***************
- *** 72,77 ****
- --- 77,83 ----
- extern int errno;
-
- static int fshort = 0;
- + static int fcreat = 0;
- static int fpack = 0;
- static int fverb = 0;
- static int fheader = 0;
- ***************
- *** 146,151 ****
- --- 152,164 ----
- all++;
- continue;
-
- + case CREATSW:
- + fcreat = 1;
- + continue;
- + case NCREATSW:
- + fcreat = -1;
- + continue;
- +
- case FASTSW:
- fshort++;
- continue;
- ***************
- *** 325,334 ****
- if (stat (strcpy (buf, m_maildir (folder)), &st) == NOTOK) {
- if (errno != ENOENT)
- adios (buf, "error on folder");
- ! cp = concat ("Create folder \"", buf, "\"? ", NULLCP);
- ! if (!getanswer (cp))
- ! done (1);
- ! free (cp);
- if (!makedir (buf))
- adios (NULLCP, "unable to create folder %s", buf);
- }
- --- 338,354 ----
- if (stat (strcpy (buf, m_maildir (folder)), &st) == NOTOK) {
- if (errno != ENOENT)
- adios (buf, "error on folder");
- ! switch (fcreat) {
- ! case 0: /* ask before create */
- ! cp = concat ("Create folder \"", buf, "\"? ", NULLCP);
- ! if (!getanswer (cp))
- ! done (1);
- ! free (cp);
- ! break;
- ! case -1: /* do not create */
- ! done (1);
- ! break;
- ! }
- if (!makedir (buf))
- adios (NULLCP, "unable to create folder %s", buf);
- }
- *** ../mh-6.8.2/uip/inc.c Wed Aug 25 15:56:29 1993
- --- uip/inc.c Wed Sep 1 14:43:18 1993
- ***************
- *** 1,6 ****
- /* inc.c - incorporate messages from a maildrop into a folder */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: inc.c,v 1.21 1993/08/20 15:50:13 jromine Exp $";
- #endif /* lint */
-
- #ifdef MAILGROUP
- --- 1,6 ----
- /* inc.c - incorporate messages from a maildrop into a folder */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: inc.c,v 1.22 1993/09/01 21:41:48 jromine Exp $";
- #endif /* lint */
-
- #ifdef MAILGROUP
- ***************
- *** 225,230 ****
- --- 225,247 ----
- mts_init (invo_name);
-
- #ifdef POP
- + #ifdef HESIOD
- + /*
- + * Scheme is:
- + * use MAILHOST environment variable if present,
- + * else try Hesiod.
- + * If that fails, use the default (if any)
- + * provided by mtstailor in mts_init()
- + */
- + if ((tmphost = getenv("MAILHOST")) != NULL)
- + pophost = tmphost;
- + else if ((po = hes_getmailhost(getusr())) != NULL &&
- + strcmp(po->po_type, "POP") == 0)
- + pophost = po->po_host;
- + #endif /* HESIOD */
- + if (pophost && *pophost)
- + host = pophost;
- +
- if ((cp = getenv ("MHPOPDEBUG")) && *cp)
- snoop++;
- #endif
- ***************
- *** 373,398 ****
- #endif /* MAILGROUP */
-
- #ifdef POP
- - #ifdef HESIOD
- - /*
- - * Scheme is:
- - * use MAILHOST environment variable if present,
- - * else try Hesiod.
- - * If that fails, use the default (if any)
- - * provided by mtstailor in mts_init()
- - */
- - if (pophost == NULL || pophost[0] == '\0')
- - {
- - if ((tmphost = getenv("MAILHOST")) != NULL)
- - pophost = tmphost;
- - else if ((po = hes_getmailhost(getusr())) != NULL &&
- - strcmp(po->po_type, "POP") == 0)
- - pophost = po->po_host;
- - }
- - #endif /* HESIOD */
- - if (pophost && *pophost)
- - host = pophost;
- -
- if (host && !*host)
- host = NULL;
- if (from || !host || rpop <= 0)
- --- 390,395 ----
- *** ../mh-6.8.2/uip/mhn.c Wed Aug 25 15:56:33 1993
- --- uip/mhn.c Tue Oct 26 15:18:06 1993
- ***************
- *** 1,6 ****
- /* mhn.c - multi-media MH */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhn.c,v 2.23 1993/08/25 17:26:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* mhn.c - multi-media MH */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhn.c,v 2.35 1993/10/26 22:17:44 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 9,14 ****
- --- 9,15 ----
- #include <setjmp.h>
- #include <signal.h>
- #include <stdio.h>
- + #include "../zotnet/mts.h"
- #include <sys/types.h>
- #include <sys/stat.h>
- #ifdef BSD42
- ***************
- *** 27,130 ****
- "noauto", 0,
-
- #define CACHESW 2
- ! "cache policy", 0,
-
- ! #define CHECKSW 3
- "check", 0,
- ! #define NCHECKSW 4
- "nocheck", 0,
-
- ! #define DEBUGSW 5
- "debug", -5,
-
- ! #define EBCDICSW 6
- "ebcdicsafe", 0,
- ! #define NEBCDICSW 7
- "noebcdicsafe", 0,
-
- ! #define FORMSW 8
- "form formfile", 4,
-
- ! #define HEADSW 9
- "headers", 0,
- ! #define NHEADSW 10
- "noheaders", 0,
-
- ! #define LISTSW 11
- "list", 0,
- ! #define NLISTSW 12
- "nolist", 0,
-
- ! #define PARTSW 13
- "part number", 0,
-
- ! #define PAUSESW 14
- "pause", 0,
- ! #define NPAUSESW 15
- "nopause", 0,
-
- ! #define SIZESW 16
- "realsize", 0,
- ! #define NSIZESW 17
- "norealsize", 0,
-
- ! #define RFC934SW 18
- "rfc934mode", 0,
- ! #define NRFC934SW 19
- "norfc934mode", 0,
-
- ! #define SERIALSW 20
- "serialonly", 0,
- ! #define NSERIALSW 21
- "noserialonly", 0,
-
- ! #define SHOWSW 22
- "show", 0,
- ! #define NSHOWSW 23
- "noshow", 0,
-
- ! #define STORESW 24
- "store", 0,
- ! #define NSTORESW 25
- "nostore", 0,
-
- ! #define TYPESW 26
- "type content", 0,
-
- ! #define VERBSW 27
- "verbose", 0,
- ! #define NVERBSW 28
- "noverbose", 0,
-
- ! #define HELPSW 29
- "help", 4,
-
- ! #define PROGSW 30
- "moreproc program", -4,
- ! #define NPROGSW 31
- "nomoreproc", -3,
-
- ! #define LENSW 32
- "length lines", -4,
- ! #define WIDSW 33
- "width columns", -4,
-
- ! #define FILESW 34 /* interface from show */
- ! "file file", -4,
- !
- ! #define VIAMSW 35
- "viamail mailpath", -7,
- ! #define VIASSW 36
- "viasubj subject", -7,
- ! #define VIAPSW 37
- "viaparm arguments", -7,
- ! #define VIADSW 38
- "viadesc text", -7,
- ! #define VIACSW 39
- "viacmnt text", -7,
- ! #define VIAZSW 40
- "viadelay seconds", -8,
- ! #define VIAFSW 41
- "viafrom mailpath", -7,
-
- NULL, 0
- --- 28,139 ----
- "noauto", 0,
-
- #define CACHESW 2
- ! "cache", 0,
- ! #define NCACHESW 3
- ! "nocache", 0,
-
- ! #define CHECKSW 4
- "check", 0,
- ! #define NCHECKSW 5
- "nocheck", 0,
-
- ! #define DEBUGSW 6
- "debug", -5,
-
- ! #define EBCDICSW 7
- "ebcdicsafe", 0,
- ! #define NEBCDICSW 8
- "noebcdicsafe", 0,
-
- ! #define FILESW 9 /* interface from show */
- ! "file file", 0,
- !
- ! #define FORMSW 10
- "form formfile", 4,
-
- ! #define HEADSW 11
- "headers", 0,
- ! #define NHEADSW 12
- "noheaders", 0,
-
- ! #define LISTSW 13
- "list", 0,
- ! #define NLISTSW 14
- "nolist", 0,
-
- ! #define PARTSW 15
- "part number", 0,
-
- ! #define PAUSESW 16
- "pause", 0,
- ! #define NPAUSESW 17
- "nopause", 0,
-
- ! #define RCACHESW 18
- ! "rcache policy", 0,
- !
- ! #define SIZESW 19
- "realsize", 0,
- ! #define NSIZESW 20
- "norealsize", 0,
-
- ! #define RFC934SW 21
- "rfc934mode", 0,
- ! #define NRFC934SW 22
- "norfc934mode", 0,
-
- ! #define SERIALSW 23
- "serialonly", 0,
- ! #define NSERIALSW 24
- "noserialonly", 0,
-
- ! #define SHOWSW 25
- "show", 0,
- ! #define NSHOWSW 26
- "noshow", 0,
-
- ! #define STORESW 27
- "store", 0,
- ! #define NSTORESW 28
- "nostore", 0,
-
- ! #define TYPESW 29
- "type content", 0,
-
- ! #define VERBSW 30
- "verbose", 0,
- ! #define NVERBSW 31
- "noverbose", 0,
- +
- + #define WCACHESW 32
- + "wcache policy", 0,
-
- ! #define HELPSW 33
- "help", 4,
-
- ! #define PROGSW 34
- "moreproc program", -4,
- ! #define NPROGSW 35
- "nomoreproc", -3,
-
- ! #define LENSW 36
- "length lines", -4,
- ! #define WIDSW 37
- "width columns", -4,
-
- ! #define VIAMSW 38
- "viamail mailpath", -7,
- ! #define VIASSW 39
- "viasubj subject", -7,
- ! #define VIAPSW 40
- "viaparm arguments", -7,
- ! #define VIADSW 41
- "viadesc text", -7,
- ! #define VIACSW 42
- "viacmnt text", -7,
- ! #define VIAZSW 43
- "viadelay seconds", -8,
- ! #define VIAFSW 44
- "viafrom mailpath", -7,
-
- NULL, 0
- ***************
- *** 136,153 ****
- #define NTYPES 20
-
- static struct swit caches[] = {
- ! #define CACHE_ALWAYS 0
- ! "always", 0,
- ! #define CACHE_ASK 1
- ! "ask", 0,
- ! #define CACHE_NEVER 2
- "never", 0,
-
- NULL, 0
- };
-
- static int autosw = 0;
- ! static int cachesw = CACHE_ASK;
- static int checksw = 0;
- int debugsw = 0;
- static int ebcdicsw = 0;
- --- 145,164 ----
- #define NTYPES 20
-
- static struct swit caches[] = {
- ! #define CACHE_NEVER 0
- "never", 0,
- + #define CACHE_PRIVATE 1
- + "private", 0,
- + #define CACHE_PUBLIC 2
- + "public", 0,
- + #define CACHE_ASK 3
- + "ask", 0,
-
- NULL, 0
- };
-
- static int autosw = 0;
- ! static int cachesw = 0;
- static int checksw = 0;
- int debugsw = 0;
- static int ebcdicsw = 0;
- ***************
- *** 154,164 ****
- --- 165,177 ----
- static char *formsw = NULLCP;
- static int headsw = 1;
- static int listsw = 0;
- + static int nolist = 0;
- static int nomore = 0;
- static int npart = 0;
- static char *parts[NPARTS + 1];
- static int pausesw = 1;
- static char *progsw = NULLCP;
- + static int rcachesw = CACHE_ASK;
- static int rfc934sw = 1;
- static int serialsw = 0;
- static int showsw = 0;
- ***************
- *** 167,172 ****
- --- 180,186 ----
- static int ntype = 0;
- static char *types[NTYPES + 1];
- int verbosw = 0;
- + static int wcachesw = CACHE_ASK;
-
- static int endian = 0;
- static char *mm_charset = NULL;
- ***************
- *** 174,180 ****
- static int xpid = 0;
- static int userrs = 0;
-
- ! static char *cache;
- static int cwdlen;
- static char *cwd;
- static char *dir;
- --- 188,195 ----
- static int xpid = 0;
- static int userrs = 0;
-
- ! static char *cache_public;
- ! static char *cache_private;
- static int cwdlen;
- static char *cwd;
- static char *dir;
- ***************
- *** 299,308 ****
- } Content, *CT;
- #define NULLCT ((CT) 0)
-
- ! static CT get_content ();
- ! static int list_content (), show_content (), store_content ();
- ! static int user_content(), compose_content(), output_content();
- ! static void free_content (), flush_errors ();
-
- #if defined(__STDC__) && defined(VSPRINTF)
- static void content_error (char *, register CT, char *, ...);
- --- 314,324 ----
- } Content, *CT;
- #define NULLCT ((CT) 0)
-
- ! static CT get_content ();
- ! static int list_content (), show_content (), store_content ();
- ! static int cache_content ();
- ! static int user_content (), compose_content (), output_content ();
- ! static void free_content (), flush_errors (), set_id ();
-
- #if defined(__STDC__) && defined(VSPRINTF)
- static void content_error (char *, register CT, char *, ...);
- ***************
- *** 310,320 ****
- static void content_error ();
- #endif
-
- ! static int init_encoding(), type_ok(), copy_some_headers(), set_endian();
- static int make_intermediates ();
- ! static int write7Bit(), writeQuoted(), writeBase64(), writeBase64aux();
- static int writeDigest (), readDigest ();
- ! static int via_mail(), via_post(), pidcheck();
-
- static CT *cts = NULL;
-
- --- 326,337 ----
- static void content_error ();
- #endif
-
- ! static int init_encoding (), type_ok (), copy_some_headers (), set_endian ();
- static int make_intermediates ();
- ! static int find_cache (), find_cache_aux (), find_cache_aux2 ();
- ! static int write7Bit (), writeQuoted (), writeBase64 (), writeBase64aux ();
- static int writeDigest (), readDigest ();
- ! static int via_mail (), via_post (), pidcheck ();
-
- static CT *cts = NULL;
-
- ***************
- *** 333,339 ****
- {
- int f6 = 0,
- msgp = 0,
- ! msgnum;
- char *cp,
- *f1 = NULL,
- *f2 = NULL,
- --- 350,357 ----
- {
- int f6 = 0,
- msgp = 0,
- ! msgnum,
- ! *icachesw;
- char *cp,
- *f1 = NULL,
- *f2 = NULL,
- ***************
- *** 393,401 ****
- continue;
-
- case CACHESW:
- if (!(cp = *argp++) || *cp == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- ! switch (cachesw = smatch (cp, caches)) {
- case AMBIGSW:
- ambigsw (cp, caches);
- done (1);
- --- 411,431 ----
- continue;
-
- case CACHESW:
- + cachesw++;
- + continue;
- + case NCACHESW:
- + cachesw = 0;
- + continue;
- +
- + case RCACHESW:
- + icachesw = &rcachesw;
- + goto do_cache;
- + case WCACHESW:
- + icachesw = &wcachesw;
- + do_cache: ;
- if (!(cp = *argp++) || *cp == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- ! switch (*icachesw = smatch (cp, caches)) {
- case AMBIGSW:
- ambigsw (cp, caches);
- done (1);
- ***************
- *** 607,613 ****
- }
-
- (void) sprintf (buf, "%s-cache", invo_name);
- ! cache = cachesw != CACHE_NEVER ? m_find (buf) : NULLCP;
-
- cwdlen = strlen (cwd = getcpy (pwd ()));
- (void) sprintf (buf, "%s-storage", invo_name);
- --- 637,648 ----
- }
-
- (void) sprintf (buf, "%s-cache", invo_name);
- ! if ((cache_public = m_find (buf)) && *cache_public != '/')
- ! cache_public = NULL;
- ! (void) sprintf (buf, "%s-private-cache", invo_name);
- ! if (!(cache_private = m_find (buf)))
- ! cache_private = ".cache";
- ! cache_private = getcpy (m_maildir (cache_private));
-
- cwdlen = strlen (cwd = getcpy (pwd ()));
- (void) sprintf (buf, "%s-storage", invo_name);
- ***************
- *** 621,626 ****
- --- 656,662 ----
- if (msgp == 1
- && !folder
- && !npart
- + && !cachesw
- && !showsw
- && !storesw
- && !ntype
- ***************
- *** 743,749 ****
- if (!*cts)
- done (1);
-
- ! if (!listsw && !showsw && !storesw)
- showsw++;
-
- /* listsw && showsw -> user wants per-message listing,
- --- 779,785 ----
- if (!*cts)
- done (1);
-
- ! if (!listsw && !showsw && !storesw && !cachesw)
- showsw++;
-
- /* listsw && showsw -> user wants per-message listing,
- ***************
- *** 757,763 ****
- (void) signal (SIGPIPE, pipeser);
-
- for (ctp = cts; ct = *ctp; ctp++)
- ! if (type_ok (ct)
- && (ct -> c_ctlistfnx
- || ct -> c_ctstorefnx
- || ct -> c_ctshowfnx)) {
- --- 793,799 ----
- (void) signal (SIGPIPE, pipeser);
-
- for (ctp = cts; ct = *ctp; ctp++)
- ! if (type_ok (ct, 1)
- && (ct -> c_ctlistfnx
- || ct -> c_ctstorefnx
- || ct -> c_ctshowfnx)) {
- ***************
- *** 774,784 ****
- "description");
-
- for (ctp = cts; ct = *ctp; ctp++)
- ! if (type_ok (ct) && ct -> c_ctlistfnx) {
- (void) umask (ct -> c_umask);
- (void) (*ct -> c_ctlistfnx) (ct, 1);
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- }
-
- flush_errors ();
- --- 810,822 ----
- "description");
-
- for (ctp = cts; ct = *ctp; ctp++)
- ! if (type_ok (ct, 1) && ct -> c_ctlistfnx) {
- (void) umask (ct -> c_umask);
- (void) (*ct -> c_ctlistfnx) (ct, 1);
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + if (ct -> c_ceclosefnx)
- + (*ct -> c_ceclosefnx) (ct);
- }
-
- flush_errors ();
- ***************
- *** 786,801 ****
-
- if (storesw) {
- for (ctp = cts; ct = *ctp; ctp++)
- ! if (type_ok (ct) && ct -> c_ctstorefnx) {
- (void) umask (ct -> c_umask);
- (void) (*ct -> c_ctstorefnx) (ct, NULLCP);
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- }
-
- flush_errors ();
- }
-
- if (listsw && !showsw && storesw && sizesw) {
- if (headsw)
- printf (LSTFMT1, "msg", "part", "type/subtype", "size",
- --- 824,854 ----
-
- if (storesw) {
- for (ctp = cts; ct = *ctp; ctp++)
- ! if (type_ok (ct, 1) && ct -> c_ctstorefnx) {
- (void) umask (ct -> c_umask);
- (void) (*ct -> c_ctstorefnx) (ct, NULLCP);
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + if (ct -> c_ceclosefnx)
- + (*ct -> c_ceclosefnx) (ct);
- }
-
- flush_errors ();
- }
-
- + if (cachesw) {
- + for (ctp = cts; ct = *ctp; ctp++)
- + if (type_ok (ct, 1)) {
- + cache_content (ct);
- + if (ct -> c_fp)
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + if (ct -> c_ceclosefnx)
- + (*ct -> c_ceclosefnx) (ct);
- + }
- +
- + flush_errors ();
- + }
- +
- if (listsw && !showsw && storesw && sizesw) {
- if (headsw)
- printf (LSTFMT1, "msg", "part", "type/subtype", "size",
- ***************
- *** 802,812 ****
- "description");
-
- for (ctp = cts; ct = *ctp; ctp++)
- ! if (type_ok (ct) && ct -> c_ctlistfnx) {
- (void) umask (ct -> c_umask);
- (void) (*ct -> c_ctlistfnx) (ct, 1);
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- }
-
- flush_errors ();
- --- 855,867 ----
- "description");
-
- for (ctp = cts; ct = *ctp; ctp++)
- ! if (type_ok (ct, 1) && ct -> c_ctlistfnx) {
- (void) umask (ct -> c_umask);
- (void) (*ct -> c_ctlistfnx) (ct, 1);
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + if (ct -> c_ceclosefnx)
- + (*ct -> c_ceclosefnx) (ct);
- }
-
- flush_errors ();
- ***************
- *** 815,824 ****
-
- if (showsw)
- for (ctp = cts; ct = *ctp; ctp++) {
- - int child_id,
- - i,
- - vecp;
- - char *vec[8];
- #if defined(BSD42) && !defined(WAITINT)
- union wait status;
- #else
- --- 870,875 ----
- ***************
- *** 826,832 ****
- #endif
- TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
-
- ! if (!type_ok (ct))
- continue;
-
- (void) umask (ct -> c_umask);
- --- 877,883 ----
- #endif
- TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
-
- ! if (!type_ok (ct, 0))
- continue;
-
- (void) umask (ct -> c_umask);
- ***************
- *** 843,890 ****
- if (!ct -> c_ctshowfnx) {
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- continue;
- }
-
- ! vecp = 0;
- ! vec[vecp++] = r1bindex (mhlproc, '/');
- ! vec[vecp++] = "-form";
- ! vec[vecp++] = formsw;
- ! vec[vecp++] = "-nobody";
- ! vec[vecp++] = ct -> c_file;
- ! if (nomore)
- ! vec[vecp++] = "-nomoreproc";
- ! else
- ! if (progsw) {
- ! vec[vecp++] = "-moreproc";
- ! vec[vecp++] = progsw;
- ! }
- ! vec[vecp] = NULL;
-
- ! (void) fflush (stdout);
- !
- ! for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
- ! sleep (5);
- ! switch (child_id) {
- ! case NOTOK:
- ! adios ("fork", "unable to");
- ! /* NOTREACHED */
-
- ! case OK:
- ! (void) execvp (mhlproc, vec);
- ! fprintf (stderr, "unable to exec ");
- ! perror (mhlproc);
- ! _exit (-1);
- ! /* NOTREACHED */
-
- ! default:
- ! xpid = -child_id;
- ! break;
- }
-
- (void) (*ct -> c_ctshowfnx) (ct, 1, 0);
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
-
- hstat = signal (SIGHUP, SIG_IGN);
- istat = signal (SIGINT, SIG_IGN);
- --- 894,954 ----
- if (!ct -> c_ctshowfnx) {
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + if (ct -> c_ceclosefnx)
- + (*ct -> c_ceclosefnx) (ct);
- continue;
- }
-
- ! if (strcmp (formsw, "mhl.null")) {
- ! int child_id,
- ! i,
- ! vecp;
- ! char *vec[8];
-
- ! vecp = 0;
- ! vec[vecp++] = r1bindex (mhlproc, '/');
- ! vec[vecp++] = "-form";
- ! vec[vecp++] = formsw;
- ! vec[vecp++] = "-nobody";
- ! vec[vecp++] = ct -> c_file;
- ! if (nomore)
- ! vec[vecp++] = "-nomoreproc";
- ! else
- ! if (progsw) {
- ! vec[vecp++] = "-moreproc";
- ! vec[vecp++] = progsw;
- ! }
- ! vec[vecp] = NULL;
-
- ! (void) fflush (stdout);
-
- ! for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
- ! sleep (5);
- ! switch (child_id) {
- ! case NOTOK:
- ! adios ("fork", "unable to");
- ! /* NOTREACHED */
- !
- ! case OK:
- ! (void) execvp (mhlproc, vec);
- ! fprintf (stderr, "unable to exec ");
- ! perror (mhlproc);
- ! _exit (-1);
- ! /* NOTREACHED */
- !
- ! default:
- ! xpid = -child_id;
- ! break;
- ! }
- }
- + else
- + xpid = 0;
-
- (void) (*ct -> c_ctshowfnx) (ct, 1, 0);
- if (ct -> c_fp)
- (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + if (ct -> c_ceclosefnx)
- + (*ct -> c_ceclosefnx) (ct);
-
- hstat = signal (SIGHUP, SIG_IGN);
- istat = signal (SIGINT, SIG_IGN);
- ***************
- *** 1452,1457 ****
- --- 1516,1541 ----
- return NOTOK;
- }
-
- + if (magic && *cp == '<') {
- + if (ct -> c_id)
- + free (ct -> c_id), ct -> c_id = NULL;
- +
- + if (!(dp = index (ct -> c_id = ++cp, '>'))) {
- + advise (NULLCP, "invalid ID in message %s", ct -> c_file);
- + return NOTOK;
- + }
- +
- + c = *dp, *dp = '\0';
- + if (*ct -> c_id)
- + ct -> c_id = concat ("<", ct -> c_id, ">\n", NULLCP);
- + else
- + ct -> c_id = NULL;
- + *dp++ = c, cp = dp;
- +
- + while (isspace (*cp))
- + cp++;
- + }
- +
- if (magic && *cp == '[') {
- ct -> c_descr = ++cp;
- for (dp = cp + strlen (cp) - 1; dp >= cp; dp--)
- ***************
- *** 1802,1809 ****
-
- /* */
-
- ! static int show_content_aux ();
-
- static int show_content (ct, serial, alternate)
- register CT ct;
- int serial,
- --- 1886,1894 ----
-
- /* */
-
- ! static int show_content_aux (), show_content_aux2 ();
-
- +
- static int show_content (ct, serial, alternate)
- register CT ct;
- int serial,
- ***************
- *** 1838,1846 ****
- register char *cp;
- char *cracked;
- {
- ! int child_id,
- ! fd,
- ! i,
- xlist,
- xpause,
- xstdin,
- --- 1923,1929 ----
- register char *cp;
- char *cracked;
- {
- ! int fd,
- xlist,
- xpause,
- xstdin,
- ***************
- *** 1847,1855 ****
- xtty;
- register char *bp;
- char *file,
- ! *vec[4],
- ! buffer[BUFSIZ],
- ! exec[BUFSIZ + sizeof "exec "];
- register CI ci = &ct -> c_ctinfo;
-
- if (!ct -> c_ceopenfnx) {
- --- 1930,1936 ----
- xtty;
- register char *bp;
- char *file,
- ! buffer[BUFSIZ];
- register CI ci = &ct -> c_ctinfo;
-
- if (!ct -> c_ceopenfnx) {
- ***************
- *** 1890,1895 ****
- --- 1971,1985 ----
- }
- break;
-
- + case 'd': /* content description */
- + if (ct -> c_descr) {
- + char *s;
- +
- + (void) strcpy (bp, s = trimcpy (ct -> c_descr));
- + free (s);
- + }
- + break;
- +
- case 'e': /* exclusive execution */
- xtty = 1;
- break;
- ***************
- *** 1906,1912 ****
- /* and fall... */
- case 'l': /* display listing prior to displaying
- content */
- ! xlist = 1;
- break;
-
- case 's': /* subtype */
- --- 1996,2002 ----
- /* and fall... */
- case 'l': /* display listing prior to displaying
- content */
- ! xlist = !nolist;
- break;
-
- case 's': /* subtype */
- ***************
- *** 1934,1941 ****
- --- 2024,2055 ----
- (void) strcpy (term, buffer);
- (void) sprintf (buffer, ct -> c_termproc, term);
- }
- +
- got_command: ;
- + return show_content_aux2 (ct, serial, alternate, cracked, buffer,
- + fd, xlist, xpause, xstdin, xtty);
- + }
-
- +
- + static int show_content_aux2 (ct, serial, alternate, cracked, buffer,
- + fd, xlist, xpause, xstdin, xtty)
- + register CT ct;
- + int serial,
- + alternate;
- + char *cracked,
- + *buffer;
- + int fd,
- + xlist,
- + xpause,
- + xstdin,
- + xtty;
- + {
- + int child_id,
- + i;
- + char *vec[4],
- + exec[BUFSIZ + sizeof "exec "];
- + register CI ci = &ct -> c_ctinfo;
- +
- if (debugsw || cracked) {
- (void) fflush (stdout);
-
- ***************
- *** 1960,1966 ****
- char prompt[BUFSIZ];
-
- if (ct -> c_ctlistfnx) {
- ! (*ct -> c_ctlistfnx) (ct, -1);
-
- if (xpause && SOprintf ("Press <return> to show content..."))
- printf ("Press <return> to show content...");
- --- 2074,2083 ----
- char prompt[BUFSIZ];
-
- if (ct -> c_ctlistfnx) {
- ! if (ct -> c_type == CT_MULTIPART)
- ! (void) list_content (ct, -1);
- ! else
- ! (*ct -> c_ctlistfnx) (ct, -1);
-
- if (xpause && SOprintf ("Press <return> to show content..."))
- printf ("Press <return> to show content...");
- ***************
- *** 2054,2060 ****
- else
- (void) pidcheck (pidXwait (child_id, NULLCP));
-
- ! (void) (*ct -> c_ceclosefnx) (ct);
- return (alternate ? DONE : OK);
- }
- }
- --- 2171,2178 ----
- else
- (void) pidcheck (pidXwait (child_id, NULLCP));
-
- ! if (fd != NOTOK)
- ! (void) (*ct -> c_ceclosefnx) (ct);
- return (alternate ? DONE : OK);
- }
- }
- ***************
- *** 2215,2237 ****
- got_filename: ;
-
- ct -> c_storage = add (buffer, NULLCP);
- ! /*
- ! if (debugsw) {
- ! */
- ! (void) fflush (stdout);
- !
- ! fprintf (stderr, "storing message %s", ct -> c_file);
- ! if (ct -> c_partno)
- ! fprintf (stderr, " part %s", ct -> c_partno);
- ! fprintf (stderr, " as file %s\n",
- ! strncmp (ct -> c_storage, cwd, cwdlen)
- ! || ct -> c_storage[cwdlen] != '/'
- ! ? ct -> c_storage
- ! : ct -> c_storage + cwdlen + 1);
- ! /*
- ! }
- ! */
- !
- if (index (ct -> c_storage, '/')
- && make_intermediates (ct -> c_storage) == NOTOK)
- return NOTOK;
- --- 2333,2346 ----
- got_filename: ;
-
- ct -> c_storage = add (buffer, NULLCP);
- ! (void) fflush (stdout);
- ! fprintf (stderr, "storing message %s", ct -> c_file);
- ! if (ct -> c_partno)
- ! fprintf (stderr, " part %s", ct -> c_partno);
- ! fprintf (stderr, " as file %s\n",
- ! strncmp (ct -> c_storage, cwd, cwdlen)
- ! || ct -> c_storage[cwdlen] != '/'
- ! ? ct -> c_storage : ct -> c_storage + cwdlen + 1);
- if (index (ct -> c_storage, '/')
- && make_intermediates (ct -> c_storage) == NOTOK)
- return NOTOK;
- ***************
- *** 2452,2458 ****
- {
- register char *cp;
-
- ! for (cp = file; cp = index (cp, '/'); cp++) {
- struct stat st;
-
- *cp = NULL;
- --- 2561,2567 ----
- {
- register char *cp;
-
- ! for (cp = file + 1; cp = index (cp, '/'); cp++) {
- struct stat st;
-
- *cp = NULL;
- ***************
- *** 2560,2571 ****
-
- /* */
-
- ! static int part_ok (ct)
- register CT ct;
- {
- register char **ap;
-
- ! if (ct -> c_type == CT_MULTIPART || npart == 0)
- return 1;
-
- for (ap = parts; *ap; ap++)
- --- 2669,2682 ----
-
- /* */
-
- ! static int part_ok (ct, sP)
- register CT ct;
- + int sP;
- {
- register char **ap;
-
- ! if ((ct -> c_type == CT_MULTIPART && (sP || ct -> c_subtype))
- ! || npart == 0)
- return 1;
-
- for (ap = parts; *ap; ap++)
- ***************
- *** 2577,2590 ****
-
-
-
- ! static int type_ok (ct)
- register CT ct;
- {
- register char **ap;
- char buffer[BUFSIZ];
- register CI ci = &ct -> c_ctinfo;
-
- ! if (ct -> c_type == CT_MULTIPART || ntype == 0)
- return 1;
-
- (void) sprintf (buffer, "%s/%s", ci -> ci_type, ci -> ci_subtype);
- --- 2688,2703 ----
-
-
-
- ! static int type_ok (ct, sP)
- register CT ct;
- + int sP;
- {
- register char **ap;
- char buffer[BUFSIZ];
- register CI ci = &ct -> c_ctinfo;
-
- ! if ((ct -> c_type == CT_MULTIPART && (sP || ct -> c_subtype))
- ! || ntype == 0)
- return 1;
-
- (void) sprintf (buffer, "%s/%s", ci -> ci_type, ci -> ci_subtype);
- ***************
- *** 2757,2763 ****
- for (part = m -> mp_parts; part; part = part -> mp_next) {
- register CT p = part -> mp_part;
-
- ! if (part_ok (p) && type_ok (p) && p -> c_ctlistfnx)
- (void) (*p -> c_ctlistfnx) (p, 0);
- }
-
- --- 2870,2876 ----
- for (part = m -> mp_parts; part; part = part -> mp_next) {
- register CT p = part -> mp_part;
-
- ! if (part_ok (p, 1) && type_ok (p, 1) && p -> c_ctlistfnx)
- (void) (*p -> c_ctlistfnx) (p, 0);
- }
-
- ***************
- *** 2805,2818 ****
- alternating -> we are an alternative
- */
-
- ! result = OK;
- for (part = m -> mp_parts; part; part = part -> mp_next) {
- p = part -> mp_part;
-
- ! if (part_ok (p)
- ! && type_ok (p)
- ! && p -> c_ctshowfnx) {
- ! switch ((*p -> c_ctshowfnx) (p, nowserial, nowalternate)) {
- case NOTOK:
- if (alternate && !alternating) {
- result = NOTOK;
- --- 2918,2932 ----
- alternating -> we are an alternative
- */
-
- ! result = alternate ? NOTOK : OK;
- for (part = m -> mp_parts; part; part = part -> mp_next) {
- p = part -> mp_part;
-
- ! if (part_ok (p, 0) && type_ok (p, 0) && p -> c_ctshowfnx) {
- ! int inneresult;
- !
- ! switch (inneresult = (*p -> c_ctshowfnx) (p, nowserial,
- ! nowalternate)) {
- case NOTOK:
- if (alternate && !alternating) {
- result = NOTOK;
- ***************
- *** 2826,2833 ****
- result = DONE;
- break;
- }
- ! if (alternate)
- alternate = nowalternate = 0;
- continue;
- }
- break;
- --- 2940,2950 ----
- result = DONE;
- break;
- }
- ! if (alternate) {
- alternate = nowalternate = 0;
- + if (result == NOTOK)
- + result = inneresult;
- + }
- continue;
- }
- break;
- ***************
- *** 2895,2900 ****
- --- 3012,3159 ----
- }
-
-
- + static int show_unknown_multi (ct, serial, alternate)
- + register CT ct;
- + int serial,
- + alternate;
- + {
- + int xlist,
- + xpause,
- + xtty;
- + register char *bp,
- + *cp;
- + char buffer[BUFSIZ];
- + register struct multipart *m = (struct multipart *) ct -> c_ctparams;
- + register struct part *part;
- + register CI ci = &ct -> c_ctinfo;
- + register CT p;
- +
- + (void) sprintf (buffer, "%s-show-%s/%s", invo_name, ci -> ci_type,
- + ci -> ci_subtype);
- + if ((cp = m_find (buffer)) == NULL || *cp == 0) {
- + (void) sprintf (buffer, "%s-show-%s", invo_name, ci -> ci_type);
- + if (((cp = m_find (buffer)) == NULL || *cp == 0)
- + && (cp = ct -> c_showproc) == NULL) {
- + if (!alternate)
- + content_error (NULLCP, ct,
- + "don't know how to display content");
- +
- + return NOTOK;
- + }
- + }
- +
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + p = part -> mp_part;
- +
- + if (!p -> c_ceopenfnx) {
- + if (!alternate)
- + content_error (NULLCP, p, "don't know how to decode content");
- +
- + return NOTOK;
- + }
- +
- + if (p -> c_storage == NULL) {
- + if ((*p -> c_ceopenfnx) (p, &p -> c_storage) == NOTOK)
- + return NOTOK;
- +
- + if (p -> c_showproc && strcmp (p -> c_showproc, "true") == 0)
- + return (alternate ? DONE : OK);
- + (*p -> c_ceclosefnx) (p);
- + }
- + }
- +
- + xlist = xpause = xtty = 0;
- + buffer[0] = '\0';
- + for (bp = buffer; *cp; cp++)
- + if (*cp == '%') {
- + switch (*++cp) {
- + case 'a': /* additional arguments */
- + {
- + register char **ap,
- + **ep;
- + char *s = "";
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values;
- + *ap;
- + ap++, ep++) {
- + (void) sprintf (bp, "%s%s=\"%s\"", s, *ap, *ep);
- + bp += strlen (bp);
- + s = " ";
- + }
- + }
- + break;
- +
- + case 'd': /* content description */
- + if (ct -> c_descr) {
- + char *s;
- +
- + (void) strcpy (bp, s = trimcpy (ct -> c_descr));
- + free (s);
- + }
- + break;
- +
- + case 'e': /* exclusive execution */
- + xtty = 1;
- + break;
- +
- + case 'F': /* %e and %f */
- + xtty = 1;
- + /* and fall... */
- + case 'f': /* filename(s) */
- + {
- + char *s = "";
- +
- + for (part = m -> mp_parts;
- + part;
- + part = part -> mp_next) {
- + p = part -> mp_part;
- +
- + (void) sprintf (bp, "%s'%s'", s, p -> c_storage);
- + bp += strlen (bp);
- + s = " ";
- + }
- + }
- + break;
- +
- + case 'p': /* pause prior to displaying content */
- + xpause = pausesw;
- + /* and fall... */
- + case 'l': /* display listing prior to displaying
- + content */
- + xlist = !nolist;
- + break;
- +
- + case 's': /* subtype */
- + (void) strcpy (bp, ci -> ci_subtype);
- + break;
- +
- + case '%':
- + goto raw;
- +
- + default:
- + *bp++ = *--cp;
- + *bp = '\0';
- + continue;
- + }
- + bp += strlen (bp);
- + }
- + else {
- + raw: ;
- + *bp++ = *cp;
- + *bp = '\0';
- + }
- + if (ct -> c_termproc) {
- + char term[BUFSIZ];
- +
- + (void) strcpy (term, buffer);
- + (void) sprintf (buffer, ct -> c_termproc, term);
- + }
- +
- + return show_content_aux2 (ct, serial, alternate, NULLCP, buffer,
- + NOTOK, xlist, xpause, 0, xtty);
- + }
- +
- +
- /* ARGSUSED */
-
- static int store_multi (ct, unused)
- ***************
- *** 2909,2916 ****
- for (part = m -> mp_parts; part; part = part -> mp_next) {
- register CT p = part -> mp_part;
-
- ! if (part_ok (p)
- ! && type_ok (p)
- && p -> c_ctstorefnx
- && (result = (*p -> c_ctstorefnx) (p, NULLCP)) == OK
- && ct -> c_subtype == MULTI_ALTERNATE)
- --- 3168,3175 ----
- for (part = m -> mp_parts; part; part = part -> mp_next) {
- register CT p = part -> mp_part;
-
- ! if (part_ok (p, 1)
- ! && type_ok (p, 1)
- && p -> c_ctstorefnx
- && (result = (*p -> c_ctstorefnx) (p, NULLCP)) == OK
- && ct -> c_subtype == MULTI_ALTERNATE)
- ***************
- *** 3010,3016 ****
- adios (NULLCP, "out of memory");
- ct -> c_ctparams = (caddr_t) m;
- ct -> c_ctlistfnx = list_multi;
- ! ct -> c_ctshowfnx = show_multi;
- ct -> c_ctstorefnx = store_multi;
- ct -> c_ctfreefnx = free_multi;
-
- --- 3269,3276 ----
- adios (NULLCP, "out of memory");
- ct -> c_ctparams = (caddr_t) m;
- ct -> c_ctlistfnx = list_multi;
- ! ct -> c_ctshowfnx = ct -> c_subtype != MULTI_UNKNOWN ? show_multi
- ! : show_unknown_multi;
- ct -> c_ctstorefnx = store_multi;
- ct -> c_ctfreefnx = free_multi;
-
- ***************
- *** 3335,3347 ****
- char *eb_site;
- char *eb_dir;
- char *eb_mode;
-
- char *eb_server;
- char *eb_subject;
- char *eb_body;
- -
- - unsigned long
- - eb_size;
- };
-
-
- --- 3595,3606 ----
- char *eb_site;
- char *eb_dir;
- char *eb_mode;
- + unsigned long
- + eb_size;
-
- char *eb_server;
- char *eb_subject;
- char *eb_body;
- };
-
-
- ***************
- *** 3482,3488 ****
- register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- register CT p = e -> eb_content;
-
- ! if (!type_ok (p))
- return OK;
-
- if (p -> c_ctshowfnx)
- --- 3741,3747 ----
- register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- register CT p = e -> eb_content;
-
- ! if (!type_ok (p, 0))
- return OK;
-
- if (p -> c_ctshowfnx)
- ***************
- *** 3500,3506 ****
- register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- register CT p = e -> eb_content;
-
- ! if (!type_ok (p))
- return OK;
-
- p -> c_partno = ct -> c_partno;
- --- 3759,3765 ----
- register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- register CT p = e -> eb_content;
-
- ! if (!type_ok (p, 1))
- return OK;
-
- p -> c_partno = ct -> c_partno;
- ***************
- *** 3660,3667 ****
- char *bp;
-
- if ((size = ct -> c_end - p -> c_begin) <= 0) {
- ! content_error (NULLCP, ct,
- ! "empty body for access-type=mail-server");
- goto no_body;
- }
-
- --- 3919,3927 ----
- char *bp;
-
- if ((size = ct -> c_end - p -> c_begin) <= 0) {
- ! if (!e -> eb_subject)
- ! content_error (NULLCP, ct,
- ! "empty body for access-type=mail-server");
- goto no_body;
- }
-
- ***************
- *** 3736,3742 ****
- return OK;
- }
-
- -
- /* APPLICATION */
-
- #define APPLICATION_UNKNOWN 0x00
- --- 3996,4001 ----
- ***************
- *** 4151,4156 ****
- --- 4410,4416 ----
-
- static int set_endian ()
- {
- + char *cp;
- union {
- long l;
- char c[sizeof (long)];
- ***************
- *** 4163,4168 ****
- --- 4423,4431 ----
- endian > 0 ? "big" : "little");
-
- mm_charset = getenv ("MM_CHARSET");
- +
- + if ((cp = getenv ("MM_NOASK")) && strcmp (cp, "1") == 0)
- + nolist = 1, listsw = pausesw = 0;
- }
-
- /* QUOTED */
- ***************
- *** 4412,4417 ****
- --- 4675,4728 ----
- return NOTOK;
- }
-
- + if (ct -> c_type == CT_MULTIPART) {
- + register char **ap,
- + **ep;
- + register CI ci = &ct -> c_ctinfo;
- +
- + len = 0;
- +
- + fprintf (ce -> ce_fp, "%s: %s/%s", TYPE_FIELD, ci -> ci_type,
- + ci -> ci_subtype);
- + len += strlen (TYPE_FIELD) + 2 + strlen (ci -> ci_type)
- + + 1 + strlen (ci -> ci_subtype);
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) {
- + (void) putc (';', ce -> ce_fp);
- + len++;
- +
- + (void) sprintf (buffer, "%s=\"%s\"", *ap, *ep);
- +
- + if (len + 1 + (cc = strlen (buffer)) >= CPERLIN) {
- + (void) fputs ("\n\t", ce -> ce_fp);
- + len = 8;
- + }
- + else {
- + (void) putc (' ', ce -> ce_fp);
- + len++;
- + }
- + fprintf (ce -> ce_fp, "%s", buffer);
- + len += cc;
- + }
- + if (ci -> ci_comment) {
- + if (len + 1 + (cc = 2 + strlen (ci -> ci_comment)) >= CPERLIN) {
- + (void) fputs ("\n\t", ce -> ce_fp);
- + len = 8;
- + }
- + else {
- + (void) putc (' ', ce -> ce_fp);
- + len++;
- + }
- + fprintf (ce -> ce_fp, "(%s)", ci -> ci_comment);
- + len += cc;
- + }
- + fprintf (ce -> ce_fp, "\n");
- + if (ct -> c_id)
- + fprintf (ce -> ce_fp, "%s:%s", ID_FIELD, ct -> c_id);
- + if (ct -> c_descr)
- + fprintf (ce -> ce_fp, "%s:%s", DESCR_FIELD, ct -> c_descr);
- + fprintf (ce -> ce_fp, "\n");
- + }
- +
- if ((len = ct -> c_end - ct -> c_begin) < 0)
- adios (NULLCP, "internal error(3)");
-
- ***************
- *** 4480,4486 ****
- char **file;
- int *fd;
- {
- ! char *id;
-
- if (ce -> ce_fp) {
- (void) fseek (ce -> ce_fp, 0L, 0);
- --- 4791,4797 ----
- char **file;
- int *fd;
- {
- ! char cachefile[BUFSIZ];
-
- if (ce -> ce_fp) {
- (void) fseek (ce -> ce_fp, 0L, 0);
- ***************
- *** 4499,4545 ****
- goto ready_already;
- }
-
- ! if (xpid) {
- ! if (xpid < 0)
- ! xpid = -xpid;
- ! (void) pidcheck (pidwait (xpid, NOTOK));
- ! xpid = 0;
- ! }
- !
- ! if (cache && (id = cb -> c_id)) {
- ! char buffer[BUFSIZ];
- !
- ! (void) sprintf (buffer, "%s/%s", cache, id = trimcpy (id));
- ! free (id);
- !
- ! id = getcpy (buffer);
- ! if (ce -> ce_fp = fopen (id, "r")) {
- ! char *bp;
- ! struct stat st;
- !
- ! if (cachesw == CACHE_ALWAYS)
- ! goto do_cache;
- !
- ! (void) fstat (fileno (ce -> ce_fp), &st);
- ! (void) sprintf (bp = buffer,
- ! "Use cached copy %s of size %lu octets",
- ! id, (unsigned long) st.st_size);
- ! bp += strlen (bp);
- ! if (ct -> c_partno) {
- ! (void) sprintf (bp, " (content %s)", ct -> c_partno);
- ! bp += strlen (bp);
- ! }
- ! (void) sprintf (bp, "? ");
- ! if (getanswer (buffer)) {
- ! do_cache: ;
- ! ce -> ce_unlink = 0;
- ! ce -> ce_file = id;
- ! goto ready_already;
- ! }
- !
- ! (void) fclose (ce -> ce_fp), ce -> ce_fp = NULL;
- }
- ! free (id);
- }
-
- return OK;
- --- 4810,4823 ----
- goto ready_already;
- }
-
- ! if (find_cache (ct, rcachesw, (int *) 0, cb -> c_id, cachefile) != NOTOK) {
- ! if (ce -> ce_fp = fopen (cachefile, "r")) {
- ! ce -> ce_unlink = 0;
- ! ce -> ce_file = getcpy (cachefile);
- ! goto ready_already;
- }
- ! else
- ! admonish (cachefile, "unable to fopen for reading");
- }
-
- return OK;
- ***************
- *** 4551,4558 ****
- register CT ct;
- char **file;
- {
- ! int fd;
- ! char *id;
- register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
-
- --- 4829,4837 ----
- register CT ct;
- char **file;
- {
- ! int fd,
- ! cachetype;
- ! char cachefile[BUFSIZ];
- register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
-
- ***************
- *** 4579,4625 ****
- return NOTOK;
- }
-
- ! if (cache
- ! && (id = e -> eb_content -> c_id)
- ! && (!e -> eb_permission
- ! || !uleq (e -> eb_permission, "read-write"))) {
- ! char buffer[BUFSIZ];
-
- ! (void) sprintf (buffer, "Make cached, publically-accessible copy of %s? ",
- ! e -> eb_name);
- ! if (cachesw == CACHE_ALWAYS || getanswer (buffer)) {
- ! int mask;
- ! char cachefile[BUFSIZ];
- ! FILE *fp;
-
- ! (void) sprintf (cachefile, "%s/%s", cache, id = trimcpy (id));
- ! free (id);
-
- ! mask = umask (0022);
- ! if (fp = fopen (cachefile, "w")) {
- ! int cc;
- ! register FILE *gp = ce -> ce_fp;
-
- ! (void) fseek (gp, 0L, 0);
- !
- ! while ((cc = fread (buffer, sizeof *buffer, sizeof buffer,
- ! gp)) > 0)
- ! (void) fwrite (buffer, sizeof *buffer, cc, fp);
- ! (void) fflush (fp);
- !
- ! if (ferror (gp)) {
- ! admonish (ce -> ce_file, "error reading");
- ! (void) unlink (cachefile);
- ! }
- !
- if (ferror (fp)) {
- admonish (cachefile, "error writing");
- (void) unlink (cachefile);
- }
- ! (void) fclose (fp);
- ! }
- ! (void) umask (mask);
- }
- }
-
- (void) fseek (ce -> ce_fp, 0L, 0);
- --- 4858,4894 ----
- return NOTOK;
- }
-
- ! if ((!e -> eb_permission || !uleq (e -> eb_permission, "read-write"))
- ! && find_cache (NULLCT, wcachesw, &cachetype,
- ! e -> eb_content -> c_id, cachefile) != NOTOK) {
- ! int mask;
- ! FILE *fp;
-
- ! mask = umask (cachetype ? ~m_gmprot () : 0222);
- ! if (fp = fopen (cachefile, "w")) {
- ! int cc;
- ! char buffer[BUFSIZ];
- ! FILE *gp = ce -> ce_fp;
-
- ! (void) fseek (gp, 0L, 0);
-
- ! while ((cc = fread (buffer, sizeof *buffer, sizeof buffer, gp))
- ! > 0)
- ! (void) fwrite (buffer, sizeof *buffer, cc, fp);
- ! (void) fflush (fp);
-
- ! if (ferror (gp)) {
- ! admonish (ce -> ce_file, "error reading");
- ! (void) unlink (cachefile);
- ! }
- ! else
- if (ferror (fp)) {
- admonish (cachefile, "error writing");
- (void) unlink (cachefile);
- }
- ! (void) fclose (fp);
- }
- + (void) umask (mask);
- }
-
- (void) fseek (ce -> ce_fp, 0L, 0);
- ***************
- *** 4633,4642 ****
- register CT ct;
- char **file;
- {
- ! int caching,
- fd;
- ! char *ftp,
- ! *id,
- *user,
- *pass,
- buffer[BUFSIZ],
- --- 4902,4912 ----
- register CT ct;
- char **file;
- {
- ! int cachetype,
- ! caching,
- fd;
- ! char *bp,
- ! *ftp,
- *user,
- *pass,
- buffer[BUFSIZ],
- ***************
- *** 4670,4682 ****
- return NOTOK;
- }
-
- ! (void) sprintf (buffer,
- ! e -> eb_size > 0
- ! ? "Retrieve %s (content %s)\n using %sFTP from site %s (%lu octets)? "
- ! : "Retrieve %s (content %s)\n using %sFTP from site %s? ",
- ! e -> eb_name, e -> eb_partno,
- ! e -> eb_flags ? "anonymous " : "",
- ! e -> eb_site, e -> eb_size);
- if (!getanswer (buffer))
- return NOTOK;
-
- --- 4940,4967 ----
- return NOTOK;
- }
-
- ! if (xpid) {
- ! if (xpid < 0)
- ! xpid = -xpid;
- ! (void) pidcheck (pidwait (xpid, NOTOK));
- ! xpid = 0;
- ! }
- !
- ! bp = buffer;
- ! (void) sprintf (bp, "Retrieve %s", e -> eb_name);
- ! bp += strlen (bp);
- ! if (e -> eb_partno) {
- ! (void) sprintf (bp, " (content %s)", e -> eb_partno);
- ! bp += strlen (bp);
- ! }
- ! (void) sprintf (bp, "\n using %sFTP from site %s",
- ! e -> eb_flags ? "anonymous " : "", e -> eb_site);
- ! bp += strlen (bp);
- ! if (e -> eb_size > 0) {
- ! (void) sprintf (bp, " (%lu octets)", e -> eb_size);
- ! bp += strlen (bp);
- ! }
- ! (void) sprintf (bp, "? ");
- if (!getanswer (buffer))
- return NOTOK;
-
- ***************
- *** 4690,4708 ****
- }
-
- ce -> ce_unlink = *file == NULL, caching = 0, cachefile[0] = 0;
- ! if (cache
- ! && (id = e -> eb_content -> c_id)
- ! && (!e -> eb_permission
- ! || !uleq (e -> eb_permission, "read-write"))) {
- ! (void) sprintf (buffer, "Make cached, publically-accessible copy? ");
- ! if (cachesw == CACHE_ALWAYS || getanswer (buffer)) {
- ! (void) sprintf (cachefile, "%s/%s", cache, id = trimcpy (id));
- ! free (id);
- !
- ! if (*file == NULL) {
- ! ce -> ce_unlink = 0;
- ! caching = 1;
- ! }
- }
- }
-
- --- 4975,4986 ----
- }
-
- ce -> ce_unlink = *file == NULL, caching = 0, cachefile[0] = 0;
- ! if ((!e -> eb_permission || !uleq (e -> eb_permission, "read-write"))
- ! && find_cache (NULLCT, wcachesw, &cachetype,
- ! e -> eb_content -> c_id, cachefile) != NOTOK) {
- ! if (*file == NULL) {
- ! ce -> ce_unlink = 0;
- ! caching = 1;
- }
- }
-
- ***************
- *** 4717,4723 ****
- return NOTOK;
- }
-
- -
- #ifdef FTP
- if (ftp)
- #endif
- --- 4995,5000 ----
- ***************
- *** 4779,4797 ****
-
- if (cachefile[0])
- if (caching)
- ! (void) chmod (cachefile, 0644);
- else {
- int mask;
- ! register FILE *fp;
-
- ! mask = umask (0022);
- if (fp = fopen (cachefile, "w")) {
- ! register FILE *gp = ce -> ce_fp;
-
- (void) fseek (gp, 0L, 0);
-
- ! while (fgets (buffer, sizeof buffer - 1, gp))
- ! (void) fputs (buffer, fp);
- (void) fflush (fp);
-
- if (ferror (gp)) {
- --- 5056,5076 ----
-
- if (cachefile[0])
- if (caching)
- ! (void) chmod (cachefile, cachetype ? m_gmprot () : 0444);
- else {
- int mask;
- ! FILE *fp;
-
- ! mask = umask (cachetype ? ~m_gmprot () : 0222);
- if (fp = fopen (cachefile, "w")) {
- ! int cc;
- ! FILE *gp = ce -> ce_fp;
-
- (void) fseek (gp, 0L, 0);
-
- ! while ((cc = fread (buffer, sizeof *buffer, sizeof buffer, gp))
- ! > 0)
- ! (void) fwrite (buffer, sizeof *buffer, cc, fp);
- (void) fflush (fp);
-
- if (ferror (gp)) {
- ***************
- *** 4798,4808 ****
- admonish (ce -> ce_file, "error reading");
- (void) unlink (cachefile);
- }
- !
- ! if (ferror (fp)) {
- ! admonish (cachefile, "error writing");
- ! (void) unlink (cachefile);
- ! }
- (void) fclose (fp);
- }
- (void) umask (mask);
- --- 5077,5087 ----
- admonish (ce -> ce_file, "error reading");
- (void) unlink (cachefile);
- }
- ! else
- ! if (ferror (fp)) {
- ! admonish (cachefile, "error writing");
- ! (void) unlink (cachefile);
- ! }
- (void) fclose (fp);
- }
- (void) umask (mask);
- ***************
- *** 4822,4831 ****
- int child_id,
- fd,
- i,
- - result,
- vecp;
- char *bp,
- - *id,
- buffer[BUFSIZ],
- *vec[7];
- register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- --- 5101,5108 ----
- ***************
- *** 4847,4860 ****
- return NOTOK;
- }
-
- ! bp = concat ("Retrieve content ", e -> eb_partno, " by asking mailbox ",
- ! e -> eb_server, "\n\n",
- ! e -> eb_subject ? e -> eb_subject: e -> eb_body, "\n? ",
- ! NULLCP);
- ! result = getanswer (bp);
- ! free (bp);
-
- ! if (!result)
- return NOTOK;
-
- vecp = 0;
- --- 5124,5147 ----
- return NOTOK;
- }
-
- ! if (xpid) {
- ! if (xpid < 0)
- ! xpid = -xpid;
- ! (void) pidcheck (pidwait (xpid, NOTOK));
- ! xpid = 0;
- ! }
-
- ! bp = buffer;
- ! (void) sprintf (bp, "Retrieve content");
- ! bp += strlen (bp);
- ! if (e -> eb_partno) {
- ! (void) sprintf (bp, " %s", e -> eb_partno);
- ! bp += strlen (bp);
- ! }
- ! (void) sprintf (bp, " by asking %s\n\n%s\n? ",
- ! e -> eb_server,
- ! e -> eb_subject ? e -> eb_subject : e -> eb_body);
- ! if (!getanswer (buffer))
- return NOTOK;
-
- vecp = 0;
- ***************
- *** 4861,4881 ****
- vec[vecp++] = r1bindex (mailproc, '/');
- vec[vecp++] = e -> eb_server;
- vec[vecp++] = "-subject";
- ! if (e -> eb_subject)
- ! vec[vecp++] = "mail-server request";
- ! else
- ! if (cache
- ! && (id = e -> eb_content -> c_id)
- ! && (!e -> eb_permission
- ! || !uleq (e -> eb_permission, "read-write"))) {
- ! (void) sprintf (buffer, "cache content as %s/%s", cache,
- ! id = trimcpy (id));
- ! free (id);
- !
- ! vec[vecp++] = buffer;
- ! }
- ! else
- ! vec[vecp++] = "mail-server request";
- vec[vecp++] = "-body";
- vec[vecp++] = e -> eb_body;
- vec[vecp] = NULL;
- --- 5148,5154 ----
- vec[vecp++] = r1bindex (mailproc, '/');
- vec[vecp++] = e -> eb_server;
- vec[vecp++] = "-subject";
- ! vec[vecp++] = e -> eb_subject ? e -> eb_subject : "mail-server request";
- vec[vecp++] = "-body";
- vec[vecp++] = e -> eb_body;
- vec[vecp] = NULL;
- ***************
- *** 4918,4923 ****
- --- 5191,5538 ----
- return fileno (ce -> ce_fp);
- }
-
- + /* CACHE */
- +
- + static int find_cache (ct, policy, writing, id, buffer)
- + CT ct;
- + int policy,
- + *writing;
- + char *id,
- + *buffer;
- + {
- + int status = NOTOK;
- +
- + if (id == NULL)
- + return NOTOK;
- + id = trimcpy (id);
- +
- + if (debugsw)
- + fprintf (stderr, "find_cache %s(%d) %s %s\n",
- + caches[policy].sw, policy, writing ? "writing" : "reading",
- + id);
- +
- + switch (policy) {
- + case CACHE_NEVER:
- + default:
- + break;
- +
- + case CACHE_ASK:
- + case CACHE_PUBLIC:
- + if (cache_private
- + && !writing
- + && find_cache_aux (writing ? 2 : 0, cache_private, id,
- + buffer) == OK) {
- + if (access (buffer, 04) != NOTOK) {
- + got_private: ;
- + if (writing)
- + *writing = 1;
- + got_it: ;
- + status = OK;
- + break;
- + }
- + }
- + if (cache_public
- + && find_cache_aux (writing ? 1 : 0, cache_public, id,
- + buffer) == OK) {
- + if (writing || access (buffer, 04) != NOTOK) {
- + if (writing)
- + *writing = 0;
- + goto got_it;
- + }
- + }
- + break;
- +
- + case CACHE_PRIVATE:
- + if (cache_private
- + && find_cache_aux (writing ? 2 : 0, cache_private, id,
- + buffer) == OK) {
- + if (writing || access (buffer, 04) != NOTOK)
- + goto got_private;
- + }
- + break;
- +
- + }
- +
- + if (status == OK && policy == CACHE_ASK) {
- + char *bp,
- + query[BUFSIZ];
- +
- + if (xpid) {
- + if (xpid < 0)
- + xpid = -xpid;
- + (void) pidcheck (pidwait (xpid, NOTOK));
- + xpid = 0;
- + }
- +
- + bp = query;
- + if (writing)
- + (void) sprintf (bp, "Make cached, publically-accessible copy");
- + else {
- + struct stat st;
- +
- + (void) sprintf (bp, "Use cached copy");
- + bp += strlen (bp);
- + if (ct -> c_partno) {
- + (void) sprintf (bp, " of content %s", ct -> c_partno);
- + bp += strlen (bp);
- + }
- + (void) stat (buffer, &st);
- + (void) sprintf (bp, " (size %lu octets)",
- + (unsigned long) st.st_size);
- + }
- + bp += strlen (bp);
- + (void) sprintf (bp, "\n in file %s? ", buffer);
- + if (!getanswer (query))
- + status = NOTOK;
- + }
- + if (status == OK && writing) {
- + if (*writing && index (buffer, '/'))
- + (void) make_intermediates (buffer);
- + (void) unlink (buffer);
- + }
- +
- + free (id);
- + return status;
- + }
- +
- + /* */
- +
- + static int find_cache_aux (writing, directory, id, buffer)
- + int writing;
- + char *directory,
- + *id,
- + *buffer;
- + {
- + int mask;
- + #ifdef BSD42
- + int usemap = index (id, '/') ? 1 : 0;
- + #else
- + int usemap = 1;
- + #endif
- + char mapfile[BUFSIZ],
- + mapname[BUFSIZ];
- + FILE *fp;
- + static int partno,
- + pid;
- + static long clock = 0L;
- +
- + if (debugsw)
- + fprintf (stderr, "find_cache_aux %s usemap=%d\n", directory, usemap);
- +
- + (void) sprintf (mapfile, "%s/cache.map", directory);
- + if (find_cache_aux2 (mapfile, id, mapname) == OK)
- + goto done_map;
- +
- + if (!writing) {
- + if (usemap)
- + return NOTOK;
- +
- + use_raw: ;
- + (void) sprintf (buffer, "%s/%s", directory, id);
- + return OK;
- + }
- +
- + if (!usemap && access (mapfile, 02) == NOTOK)
- + goto use_raw;
- +
- + if (clock != 0L) {
- + long now;
- +
- + (void) time (&now);
- + if (now > clock)
- + clock = 0L;
- + }
- + else
- + pid = getpid ();
- + if (clock == 0L) {
- + (void) time (&clock);
- + partno = 0;
- + }
- + else
- + if (partno > 0xff)
- + clock++, partno = 0;
- +
- + (void) sprintf (mapname, "%08x%04x%02x", clock & 0xffffffff,
- + pid & 0xffff, partno++ & 0xff);
- + if (debugsw)
- + fprintf (stderr, "creating mapping %s -> %s\n", mapname, id);
- +
- + (void) make_intermediates (mapfile);
- + mask = umask (writing == 2 ? 0077 : 0);
- + if (!(fp = lkfopen (mapfile, "a")) && errno == ENOENT) {
- + int fd = creat (mapfile, 0666);
- +
- + if (fd != NOTOK) {
- + (void) close (fd);
- + fp = lkfopen (mapfile, "a");
- + }
- + }
- + (void) umask (mask);
- + if (!fp)
- + return NOTOK;
- + fprintf (fp, "%s: %s\n", mapname, id);
- + (void) lkfclose (fp, mapfile);
- +
- + done_map: ;
- + if (*mapname == '/')
- + (void) strcpy (buffer, mapname);
- + else
- + (void) sprintf (buffer, "%s/%s", directory, mapname);
- + if (debugsw)
- + fprintf (stderr, "use %s\n", buffer);
- +
- + return OK;
- + }
- +
- + /* */
- +
- + static int find_cache_aux2 (mapfile, id, mapname)
- + char *mapfile,
- + *id,
- + *mapname;
- + {
- + int state;
- + char buf[BUFSIZ],
- + name[NAMESZ];
- + FILE *fp;
- +
- + if (!(fp = lkfopen (mapfile, "r")))
- + return NOTOK;
- +
- + for (state = FLD;;) {
- + int result;
- + register char *cp,
- + *dp;
- +
- + switch (state = m_getfld (state, name, buf, sizeof buf, fp)) {
- + case FLD:
- + case FLDPLUS:
- + case FLDEOF:
- + (void) strcpy (mapname, name);
- + if (state != FLDPLUS)
- + cp = buf;
- + else {
- + cp = add (buf, NULLCP);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, fp);
- + cp = add (buf, cp);
- + }
- + }
- + dp = trimcpy (cp);
- + if (cp != buf)
- + free (cp);
- + if (debugsw)
- + fprintf (stderr, "compare %s to %s <- %s\n", id, dp,
- + mapname);
- + result = strcmp (id, dp);
- + free (dp);
- + if (result == 0) {
- + (void) lkfclose (fp, mapfile);
- + return OK;
- + }
- + if (state != FLDEOF)
- + continue;
- + /* else fall... */
- +
- + case BODY:
- + case BODYEOF:
- + case FILEEOF:
- + default:
- + break;
- + }
- + break;
- + }
- +
- + (void) lkfclose (fp, mapfile);
- + return NOTOK;
- + }
- +
- + /* */
- +
- + static int cache_content (ct)
- + register CT ct;
- + {
- + int cachetype;
- + char *file,
- + cachefile[BUFSIZ];
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + if (!ct -> c_id) {
- + advise (NULLCP, "no %s: field in %s", ID_FIELD, ct -> c_file);
- + return;
- + }
- +
- + if (!ce) {
- + advise (NULLCP, "unable to decode %s", ct -> c_file);
- + return;
- + }
- +
- + if (ct -> c_ceopenfnx == openMail) {
- + advise (NULLCP, "a radish may no know Greek, but I do...");
- + return;
- + }
- +
- + if (find_cache (NULLCT, wcachesw != CACHE_NEVER ? wcachesw : CACHE_ASK,
- + &cachetype, ct -> c_id, cachefile)
- + == NOTOK) {
- + advise (NULLCP, "unable to cache %s's contents", ct -> c_file);
- + return;
- + }
- + if (wcachesw != CACHE_NEVER && wcachesw != CACHE_ASK) {
- + (void) fflush (stdout);
- + fprintf (stderr, "caching message %s as file %s\n", ct -> c_file,
- + cachefile);
- + }
- +
- + if (ce -> ce_file) {
- + int mask = umask (cachetype ? ~m_gmprot () : 0222);
- + FILE *fp;
- +
- + if (debugsw)
- + fprintf (stderr, "caching by copying %s...\n", ce -> ce_file);
- +
- + file = NULL;
- + if ((*ct -> c_ceopenfnx) (ct, &file) == NOTOK)
- + goto reset_umask;
- +
- + if (fp = fopen (cachefile, "w")) {
- + int cc;
- + char buffer[BUFSIZ];
- + FILE *gp = ce -> ce_fp;
- +
- + (void) fseek (gp, 0L, 0);
- +
- + while ((cc = fread (buffer, sizeof *buffer, sizeof buffer, gp))
- + > 0)
- + (void) fwrite (buffer, sizeof *buffer, cc, fp);
- + (void) fflush (fp);
- +
- + if (ferror (gp)) {
- + admonish (ce -> ce_file, "error reading");
- + (void) unlink (cachefile);
- + }
- + else
- + if (ferror (fp)) {
- + admonish (cachefile, "error writing");
- + (void) unlink (cachefile);
- + }
- + (void) fclose (fp);
- + }
- + else
- + content_error (cachefile, ct, "unable to fopen for writing");
- + reset_umask: ;
- + (void) umask (mask);
- + }
- + else {
- + if (debugsw)
- + fprintf (stderr, "in place caching...\n");
- +
- + file = cachefile;
- + if ((*ct -> c_ceopenfnx) (ct, &file) != NOTOK)
- + (void) chmod (cachefile, cachetype ? m_gmprot () : 0444);
- + }
- + }
- +
- /* COMPOSITION */
-
- static char prefix[] = "----- =_aaaaaaaaaa";
- ***************
- *** 5045,5050 ****
- --- 5660,5667 ----
- free_content (ct);
- free_ct = ct = p;
- }
- + else
- + set_id (ct, 1);
-
- if ((cp = index (prefix, 'a')) == NULL)
- adios (NULLCP, "internal error(4)");
- ***************
- *** 5153,5158 ****
- --- 5770,5776 ----
- *ctp = ct;
- ci = &ct -> c_ctinfo;
- ct -> c_ctlistfnx = list_content;
- + set_id (ct, 0);
-
- if (buf[0] != '#' || buf[1] == '#' || buf[1] == '<') {
- int headers,
- ***************
- *** 5241,5246 ****
- --- 5859,5869 ----
- s2i++;
- switch (ct -> c_type = s2i -> si_value) {
- case CT_MESSAGE:
- + if (uleq (ci -> ci_subtype, "rfc822")) {
- + ct -> c_encoding = CE_7BIT; /* XXX */
- + goto call_init;
- + }
- + /* else fall... */
- case CT_MULTIPART:
- adios (NULLCP,
- "it makes sense to define a in-line %s content... NOT!",
- ***************
- *** 5248,5253 ****
- --- 5871,5877 ----
- /* NOTREACHED */
-
- default:
- + call_init: ;
- if (ct -> c_ctinitfnx = s2i -> si_init)
- (void) (*ct -> c_ctinitfnx) (ct);
- break;
- ***************
- *** 5282,5287 ****
- --- 5906,5912 ----
- if (uleq (ci -> ci_subtype, "external-body"))
- adios (NULLCP, "use \"#@type/subtype ... [] ...\" instead of \"#%s/%s\"",
- ci -> ci_type, ci -> ci_subtype);
- + use_forw: ;
- adios (NULLCP,
- "use \"#forw [+folder] [msgs]\" instead of \"#%s/%s\"",
- ci -> ci_type, ci -> ci_subtype);
- ***************
- *** 5294,5305 ****
- }
-
- if (extrnal) {
- - char msgid[BUFSIZ];
- register struct exbody *e;
- CT p;
- - static int partno;
- - static long clock = 0L;
- - static char *msgfmt;
-
- if (!ci -> ci_magic)
- adios (NULLCP, "need external information for \"#@%s/%s\"",
- --- 5919,5926 ----
- ***************
- *** 5334,5350 ****
- if (params_external (ct, 1) == NOTOK)
- done (1);
-
- - if (clock == 0L) {
- - (void) time (&clock);
- - (void) sprintf (msgid, "<%d.%ld.%%d@%s>\n", getpid (), clock,
- - LocalName ());
- - partno = 0;
- - msgfmt = getcpy (msgid);
- - }
- -
- - (void) sprintf (msgid, msgfmt, ++partno);
- - p -> c_id = getcpy (msgid);
- -
- return OK;
- }
-
- --- 5955,5960 ----
- ***************
- *** 5419,5436 ****
- free (folder);
-
- free_ctinfo (ct);
- ! if (get_ctinfo ("multipart/digest", ct, 0) == NOTOK)
- ! done (1);
- ! ct -> c_type = CT_MULTIPART;
- ! ct -> c_subtype = MULTI_DIGEST;
- ! ct -> c_ctlistfnx = list_multi;
- ! ct -> c_ctfreefnx = free_multi;
-
- ! if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
- ! adios (NULLCP, "out of memory");
- ! ct -> c_ctparams = (caddr_t) m;
-
- ! pp = &m -> mp_parts;
- for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
- if (mp -> msgstats[msgnum] & SELECTED) {
- register struct part *part;
- --- 6029,6050 ----
- free (folder);
-
- free_ctinfo (ct);
- ! if (mp -> numsel > 1) {
- ! if (get_ctinfo ("multipart/digest", ct, 0) == NOTOK)
- ! done (1);
- ! ct -> c_type = CT_MULTIPART;
- ! ct -> c_subtype = MULTI_DIGEST;
- ! ct -> c_ctlistfnx = list_multi;
- ! ct -> c_ctfreefnx = free_multi;
-
- ! if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
- ! adios (NULLCP, "out of memory");
- ! ct -> c_ctparams = (caddr_t) m;
-
- ! pp = &m -> mp_parts;
- ! }
- ! else
- ! free_content (ct);
- for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
- if (mp -> msgstats[msgnum] & SELECTED) {
- register struct part *part;
- ***************
- *** 5449,5458 ****
- if (listsw && stat (p -> c_file, &st) != NOTOK)
- p -> c_end = (long) st.st_size;
-
- ! if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
- ! adios (NULLCP, "out of memory");
- ! *pp = part, pp = &part -> mp_next;
- ! part -> mp_part = p;
- }
-
- m_fmsg (mp);
- --- 6063,6077 ----
- if (listsw && stat (p -> c_file, &st) != NOTOK)
- p -> c_end = (long) st.st_size;
-
- ! if (mp -> numsel > 1) {
- ! if ((part = (struct part *) calloc (1, sizeof *part))
- ! == NULL)
- ! adios (NULLCP, "out of memory");
- ! *pp = part, pp = &part -> mp_next;
- ! part -> mp_part = p;
- ! }
- ! else
- ! *ctp = ct = p;
- }
-
- m_fmsg (mp);
- ***************
- *** 5470,5480 ****
- adios (NULLCP, "unknown directive \"#%s\"", ci -> ci_type);
-
- /* #begin [ alternative | parallel ] */
- ! vrsn = !ci -> ci_magic ? MULTI_MIXED
- ! : uprf (ci -> ci_magic, "alt") ? MULTI_ALTERNATE
- ! : MULTI_PARALLEL;
- free_ctinfo (ct);
- ! (void) sprintf (buffer, "multipart/%s", SubMultiPart[vrsn - 1].kv_key);
- if (get_ctinfo (buffer, ct, 0) == NOTOK)
- done (1);
- ct -> c_type = CT_MULTIPART;
- --- 6089,6109 ----
- adios (NULLCP, "unknown directive \"#%s\"", ci -> ci_type);
-
- /* #begin [ alternative | parallel ] */
- ! if (!ci -> ci_magic)
- ! cp = SubMultiPart[(vrsn = MULTI_MIXED) - 1].kv_key;
- ! else
- ! if (uleq (ci -> ci_magic, "alternative"))
- ! cp = SubMultiPart[(vrsn = MULTI_ALTERNATE) - 1].kv_key;
- ! else
- ! if (uleq (ci -> ci_magic, "parallel"))
- ! cp = SubMultiPart[(vrsn = MULTI_PARALLEL) - 1].kv_key;
- ! else
- ! if (uprf (ci -> ci_magic, "digest"))
- ! goto use_forw;
- ! else
- ! cp = ci -> ci_magic, vrsn = MULTI_UNKNOWN;
- free_ctinfo (ct);
- ! (void) sprintf (buffer, "multipart/%s", cp);
- if (get_ctinfo (buffer, ct, 0) == NOTOK)
- done (1);
- ct -> c_type = CT_MULTIPART;
- ***************
- *** 5510,5515 ****
- --- 6139,6166 ----
-
- /* */
-
- + static void set_id (ct, top)
- + CT ct;
- + int top;
- + {
- + char msgid[BUFSIZ];
- + static int partno;
- + static long clock = 0L;
- + static char *msgfmt;
- +
- + if (clock == 0L) {
- + (void) time (&clock);
- + (void) sprintf (msgid, "<%d.%ld.%%d@%s>\n", getpid (), clock,
- + LocalName ());
- + partno = 0;
- + msgfmt = getcpy (msgid);
- + }
- + (void) sprintf (msgid, msgfmt, top ? 0 : ++partno);
- + ct -> c_id = getcpy (msgid);
- + }
- +
- + /* */
- +
- static char ebcdicsafe[0x100] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- ***************
- *** 5905,5911 ****
- (void) putc (' ', out);
- len++;
- }
- ! fprintf (out, "%s", buffer);
- len += cc;
- }
- if (ci -> ci_comment) {
- --- 6556,6562 ----
- (void) putc (' ', out);
- len++;
- }
- ! fputs (buffer, out);
- len += cc;
- }
- if (ci -> ci_comment) {
- ***************
- *** 5920,5926 ****
- fprintf (out, "(%s)", ci -> ci_comment);
- len += cc;
- }
- ! fprintf (out, "\n");
- if (ct -> c_id)
- fprintf (out, "%s: %s", ID_FIELD, ct -> c_id);
- if (ct -> c_descr)
- --- 6571,6577 ----
- fprintf (out, "(%s)", ci -> ci_comment);
- len += cc;
- }
- ! (void) putc ('\n', out);
- if (ct -> c_id)
- fprintf (out, "%s: %s", ID_FIELD, ct -> c_id);
- if (ct -> c_descr)
- ***************
- *** 5936,5942 ****
- register struct part *part;
-
- if (ct -> c_rfc934)
- ! fprintf (out, "\n");
-
- for (part = m -> mp_parts; part; part = part -> mp_next) {
- register CT p = part -> mp_part;
- --- 6587,6593 ----
- register struct part *part;
-
- if (ct -> c_rfc934)
- ! (void) putc ('\n', out);
-
- for (part = m -> mp_parts; part; part = part -> mp_next) {
- register CT p = part -> mp_part;
- ***************
- *** 5965,5986 ****
- (void) writeQuoted (ct, out);
- break;
- }
- ! if (ct -> c_subtype != TEXT_PLAIN && ct -> c_encoding != CE_7BIT)
- goto quoted_printable;
- - if (checksw)
- - goto quoted_printable;
- /* else fall... */
-
- case CT_MESSAGE:
- seven_bit: ;
- ! fprintf (out, "\n");
- if (ct -> c_type == CT_MESSAGE
- && ct -> c_subtype == MESSAGE_EXTERNAL) {
- register struct exbody *e = (struct exbody *) ct -> c_ctparams;
-
- (void) output_content (e -> eb_content, out);
- ! if (e -> eb_body)
- ! fprintf (out, "\n%s\n", e -> eb_body);
- }
- else
- (void) write7Bit (ct, out);
- --- 6616,6699 ----
- (void) writeQuoted (ct, out);
- break;
- }
- ! if ((ct -> c_subtype != TEXT_PLAIN && ct -> c_encoding != CE_7BIT)
- ! || checksw)
- goto quoted_printable;
- /* else fall... */
-
- case CT_MESSAGE:
- seven_bit: ;
- ! (void) putc ('\n', out);
- if (ct -> c_type == CT_MESSAGE
- && ct -> c_subtype == MESSAGE_EXTERNAL) {
- register struct exbody *e = (struct exbody *) ct -> c_ctparams;
-
- (void) output_content (e -> eb_content, out);
- ! if (e -> eb_body) {
- ! register char *cp;
- !
- ! putc ('\n', out);
- ! for (cp = e -> eb_body; *cp; cp++) {
- ! CT ct2 = e -> eb_content;
- ! CI ci2 = &ct2 -> c_ctinfo;
- !
- ! if (*cp == '\\')
- ! switch (*++cp) {
- ! case 'I':
- ! if (ct2 -> c_id) {
- ! char *dp = trimcpy (ct2 -> c_id);
- !
- ! (void) fputs (dp, out);
- ! free (dp);
- ! }
- ! continue;
- !
- ! case 'N':
- ! for (ap = ci2 -> ci_attrs,
- ! ep = ci2 -> ci_values;
- ! *ap;
- ! ap++, ep++)
- ! if (uleq (*ap, "name")) {
- ! fprintf (out, "%s", *ep);
- ! break;
- ! }
- ! continue;
- !
- ! case 'T':
- ! fprintf (out, "%s/%s", ci2 -> ci_type,
- ! ci2 -> ci_subtype);
- ! for (ap = ci2 -> ci_attrs,
- ! ep = ci2 -> ci_values;
- ! *ap;
- ! ap++, ep++)
- ! fprintf (out, "; %s=\"%s\"", *ap, *ep);
- ! continue;
- !
- ! case 'n':
- ! (void) putc ('\n', out);
- ! continue;
- !
- ! case 't':
- ! (void) putc ('\t', out);
- ! continue;
- !
- ! case '\0':
- ! cp--;
- ! break;
- !
- ! case '\\':
- ! case '"':
- ! break;
- !
- ! default:
- ! (void) putc ('\\', out);
- ! break;
- ! }
- !
- ! (void) putc (*cp, out);
- ! }
- ! putc ('\n', out);
- ! }
- }
- else
- (void) write7Bit (ct, out);
- ***************
- *** 6072,6078 ****
- break;
-
- default:
- ! if (ebcdicsw && !ebcdicsafe[*cp & 0xff])
- goto three_print;
- (void) putc (*cp, out);
- n++;
- --- 6785,6793 ----
- break;
-
- default:
- ! if (*cp < '!'
- ! || *cp > '~'
- ! || (ebcdicsw && !ebcdicsafe[*cp & 0xff]))
- goto three_print;
- (void) putc (*cp, out);
- n++;
- *** ../mh-6.8.2/uip/mhparam.c Wed Aug 25 15:56:38 1993
- --- uip/mhparam.c Wed Sep 1 16:01:13 1993
- ***************
- *** 1,6 ****
- /* mhparam.c - print mh_profile values */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhparam.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
- /* contributed by Jeffrey C Honig <Jeffrey_C_Honig@cornell.edu> */
-
- --- 1,6 ----
- /* mhparam.c - print mh_profile values */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhparam.c,v 1.9 1993/09/01 23:00:59 jromine Exp $";
- #endif /* lint */
- /* contributed by Jeffrey C Honig <Jeffrey_C_Honig@cornell.edu> */
-
- ***************
- *** 7,12 ****
- --- 7,16 ----
- #include "../h/mh.h"
- #include <stdio.h>
-
- + extern char *mhlibdir; /* NB: this will change soon */
- + char *sbackup = SBACKUP;
- + char *slink = LINK;
- +
- /* */
-
- static struct swit switches[] = {
- ***************
- *** 151,156 ****
- --- 155,164 ----
- { "vmhproc", &vmhproc },
- { "whatnowproc", &whatnowproc },
- { "whomproc", &whomproc },
- + { "libdir", &mhlibdir },
- + { "sbackup", &sbackup },
- + { "link", &slink },
- +
- { NULL, NULL },
- };
-
- *** ../mh-6.8.2/uip/msgchk.c Wed Aug 25 15:56:41 1993
- --- uip/msgchk.c Wed Sep 1 14:44:46 1993
- ***************
- *** 1,6 ****
- /* msgchk.c - check for mail */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msgchk.c,v 1.12 1993/08/20 15:52:41 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* msgchk.c - check for mail */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msgchk.c,v 1.13 1993/09/01 21:44:19 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 200,224 ****
-
- /* */
- #ifdef POP
- #ifdef HESIOD
- ! /*
- ! * Scheme is:
- ! * use MAILHOST environment variable if present,
- ! * else try Hesiod.
- ! * If that fails, use the default (if any)
- ! * provided by mtstailor in mts_init()
- ! */
- ! if (pophost == NULL || pophost[0] == '\0')
- ! {
- if ((tmphost = getenv("MAILHOST")) != NULL)
- ! pophost = tmphost;
- else if ((po = hes_getmailhost(vecp ? vec[0] : user)) != NULL &&
- ! strcmp(po->po_type, "POP") == 0)
- ! pophost = po->po_host;
- ! }
- #endif /* HESIOD */
- ! if (pophost && *pophost)
- ! host = pophost;
- if (!host || !*host)
- host = NULL;
- if (!host || rpop <= 0)
- --- 200,223 ----
-
- /* */
- #ifdef POP
- + if (!host || !*host) { /* -host not specified by user */
- #ifdef HESIOD
- ! /*
- ! * Scheme is:
- ! * use MAILHOST environment variable if present,
- ! * else try Hesiod.
- ! * If that fails, use the default (if any)
- ! * provided by mtstailor in mts_init()
- ! */
- if ((tmphost = getenv("MAILHOST")) != NULL)
- ! pophost = tmphost;
- else if ((po = hes_getmailhost(vecp ? vec[0] : user)) != NULL &&
- ! strcmp(po->po_type, "POP") == 0)
- ! pophost = po->po_host;
- #endif /* HESIOD */
- ! if (pophost && *pophost)
- ! host = pophost;
- ! }
- if (!host || !*host)
- host = NULL;
- if (!host || rpop <= 0)
- *** ../mh-6.8.2/uip/msh.c Wed Aug 25 15:56:34 1993
- --- uip/msh.c Thu Aug 26 11:25:31 1993
- ***************
- *** 1,6 ****
- /* msh.c - The MH shell (sigh) */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msh.c,v 2.13 1992/12/15 00:20:22 jromine Exp jromine $";
- #endif /* lint */
-
- /* TODO:
- --- 1,6 ----
- /* msh.c - The MH shell (sigh) */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msh.c,v 2.13 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- /* TODO:
- *** ../mh-6.8.2/uip/mshcmds.c Wed Aug 25 15:56:37 1993
- --- uip/mshcmds.c Tue Nov 30 19:50:38 1993
- ***************
- *** 1,6 ****
- /* mshcmds.c - command handlers in msh */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mshcmds.c,v 1.25 1992/12/15 00:20:22 jromine Exp jromine $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* mshcmds.c - command handlers in msh */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mshcmds.c,v 1.28 1993/12/01 03:50:31 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 2708,2714 ****
- state;
- register char *bp,
- *dp;
- ! char *cp,
- buf[BUFSIZ],
- name[NAMESZ];
- FILE *fp;
- --- 2708,2715 ----
- state;
- register char *bp,
- *dp;
- ! char *chset,
- ! *cp,
- buf[BUFSIZ],
- name[NAMESZ];
- FILE *fp;
- ***************
- *** 2719,2724 ****
- --- 2720,2728 ----
-
- fp = msh_ready (msgnum, 1);
-
- + if (!(chset = getenv ("MM_CHARSET")))
- + chset = "us-ascii";
- +
- for (state = FLD;;)
- switch (state = m_getfld (state, name, buf, sizeof buf, fp)) {
- case FLD:
- ***************
- *** 2793,2809 ****
- while (isspace (*dp))
- dp++;
- if (*dp == '"') {
- ! dp++;
- ! if (strlen (dp) >= sizeof "us-ascii\""
- ! && *(bp = dp + sizeof "us-ascii" - 1)=='"')
- *bp = NULL;
- }
- else
- ! if (strlen (dp) >= sizeof "us-ascii"
- ! && isspace (*(bp =
- ! dp + sizeof "us-ascii" - 1)))
- ! *bp = NULL;
- ! result = !uleq (dp, "us-ascii");
- }
- else
- if (!(result = !uleq (bp, "text"))) {
- --- 2797,2815 ----
- while (isspace (*dp))
- dp++;
- if (*dp == '"') {
- ! if (bp = index (++dp, '"'))
- *bp = NULL;
- }
- else
- ! for (bp = dp; *bp; bp++)
- ! if (isspace (*bp)) {
- ! *bp = NULL;
- ! break;
- ! }
- ! if ((result = !uleq (dp, chset))
- ! && uleq (dp, "us-ascii")
- ! && uleq (chset, "iso-8859-1"))
- ! result = 0;
- }
- else
- if (!(result = !uleq (bp, "text"))) {
- ***************
- *** 2833,2840 ****
- for (dp = bp; istoken (*dp); dp++)
- continue;
- *dp = NULL;
- ! if (result = !uleq (bp, "7bit"))
- ! Msgs[msgnum].m_flags |= MHNYES;
-
- free (cp);
- if (result) {
- --- 2839,2847 ----
- for (dp = bp; istoken (*dp); dp++)
- continue;
- *dp = NULL;
- ! result = !uleq (bp, "7bit")
- ! && !uleq (bp, "8bit")
- ! && !uleq (bp, "binary");
-
- free (cp);
- if (result) {
- *** ../mh-6.8.2/uip/popsbr.c Wed Aug 25 15:56:34 1993
- --- uip/popsbr.c Thu Aug 26 11:26:07 1993
- ***************
- *** 1,6 ****
- /* popsbr.c - POP client subroutines */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popsbr.c,v 2.5 1993/08/25 17:26:40 jromine Exp $";
- #endif lint
-
- #if defined(NNTP) && !defined(PSHSBR)
- --- 1,6 ----
- /* popsbr.c - POP client subroutines */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popsbr.c,v 2.6 1993/08/26 18:25:52 jromine Exp $";
- #endif lint
-
- #if defined(NNTP) && !defined(PSHSBR)
- ***************
- *** 198,205 ****
- #endif
- }
- #else /* NNTP */
- ! if (*response < CHAR_ERR)
- return OK;
- #endif
- (void) strcpy (buffer, response);
- (void) command ("QUIT");
- --- 198,207 ----
- #endif
- }
- #else /* NNTP */
- ! if (*response < CHAR_ERR) {
- ! (void) command ("MODE READER");
- return OK;
- + }
- #endif
- (void) strcpy (buffer, response);
- (void) command ("QUIT");
- ***************
- *** 302,309 ****
- --- 304,316 ----
- int pop_exists (action)
- int (*action) ();
- {
- + #ifdef XMSGS /* hacked into NNTP 1.5 */
- if (traverse (action, "XMSGS %d-%d",
- (targ_t)xtnd_first, (targ_t)xtnd_last, 0, 0) == OK)
- + return OK;
- + #endif
- + if (traverse (action, "LISTGROUP", /* provided by INN 1.4 */
- + 0, 0, 0, 0) == OK)
- return OK;
- return traverse (action, "XHDR NONAME %d-%d",
- (targ_t)xtnd_first, (targ_t)xtnd_last, 0, 0);
- *** ../mh-6.8.2/uip/pshsbr.c Wed Aug 25 15:56:34 1993
- --- uip/pshsbr.c Thu Aug 26 11:26:07 1993
- ***************
- *** 1,6 ****
- /* popsbr.c - POP client subroutines */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popsbr.c,v 2.5 1993/08/25 17:26:40 jromine Exp $";
- #endif lint
-
- #if defined(NNTP) && !defined(PSHSBR)
- --- 1,6 ----
- /* popsbr.c - POP client subroutines */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popsbr.c,v 2.6 1993/08/26 18:25:52 jromine Exp $";
- #endif lint
-
- #if defined(NNTP) && !defined(PSHSBR)
- ***************
- *** 198,205 ****
- #endif
- }
- #else /* NNTP */
- ! if (*response < CHAR_ERR)
- return OK;
- #endif
- (void) strcpy (buffer, response);
- (void) command ("QUIT");
- --- 198,207 ----
- #endif
- }
- #else /* NNTP */
- ! if (*response < CHAR_ERR) {
- ! (void) command ("MODE READER");
- return OK;
- + }
- #endif
- (void) strcpy (buffer, response);
- (void) command ("QUIT");
- ***************
- *** 302,309 ****
- --- 304,316 ----
- int pop_exists (action)
- int (*action) ();
- {
- + #ifdef XMSGS /* hacked into NNTP 1.5 */
- if (traverse (action, "XMSGS %d-%d",
- (targ_t)xtnd_first, (targ_t)xtnd_last, 0, 0) == OK)
- + return OK;
- + #endif
- + if (traverse (action, "LISTGROUP", /* provided by INN 1.4 */
- + 0, 0, 0, 0) == OK)
- return OK;
- return traverse (action, "XHDR NONAME %d-%d",
- (targ_t)xtnd_first, (targ_t)xtnd_last, 0, 0);
- *** ../mh-6.8.2/uip/replsbr.c Wed Aug 25 15:56:26 1993
- --- uip/replsbr.c Sat Sep 4 12:31:54 1993
- ***************
- *** 1,6 ****
- /* replsbr.c - routines to help repl along... */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: replsbr.c,v 1.15 1993/08/25 17:27:35 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* replsbr.c - routines to help repl along... */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: replsbr.c,v 1.17 1993/09/04 19:31:32 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 8,13 ****
- --- 8,15 ----
- #include "../h/formatsbr.h"
- #include <ctype.h>
- #include <stdio.h>
- + #include <sys/types.h> /* off_t */
- + #include <sys/file.h> /* L_SET */
-
-
- extern short ccto, /* from repl.c */
- ***************
- *** 411,416 ****
- --- 413,419 ----
- mhl = r1bindex (mhlproc, '/');
-
- rewind (in);
- + (void) lseek (fileno(in), (off_t)0, L_SET);
- (void) fflush (out);
-
- switch (pid = vfork ()) {
- ***************
- *** 422,431 ****
- (void) dup2 (fileno (out), fileno (stdout));
- closefds (3);
-
- - #ifdef _FSTDIO
- - /* <sigh> the code assumed that rewind does this. */
- - (void) lseek (fileno(stdin), (off_t)0, SEEK_SET);
- - #endif
- execlp (mhlproc, mhl, "-form", filter, "-noclear", NULLCP);
- fprintf (stderr, "unable to exec ");
- perror (mhlproc);
- --- 425,430 ----
- *** ../mh-6.8.2/uip/show.c Wed Aug 25 15:56:35 1993
- --- uip/show.c Tue Oct 26 13:09:41 1993
- ***************
- *** 1,6 ****
- /* show.c - list messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: show.c,v 1.12 1992/12/15 00:20:22 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* show.c - list messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: show.c,v 1.14 1993/10/26 20:09:21 jromine Exp $";
- #endif /* lint */
-
- #include "../h/mh.h"
- ***************
- *** 336,342 ****
- state;
- register char *bp,
- *dp;
- ! char *cp,
- buf[BUFSIZ],
- name[NAMESZ];
- FILE *fp;
- --- 336,343 ----
- state;
- register char *bp,
- *dp;
- ! char *chset,
- ! *cp,
- buf[BUFSIZ],
- name[NAMESZ];
- FILE *fp;
- ***************
- *** 344,349 ****
- --- 345,353 ----
- if ((fp = fopen (msgnam, "r")) == NULL)
- return 0;
-
- + if (!(chset = getenv ("MM_CHARSET")))
- + chset = "us-ascii";
- +
- for (state = FLD;;)
- switch (state = m_getfld (state, name, buf, sizeof buf, fp)) {
- case FLD:
- ***************
- *** 418,434 ****
- while (isspace (*dp))
- dp++;
- if (*dp == '"') {
- ! dp++;
- ! if (strlen (dp) >= sizeof "us-ascii\""
- ! && *(bp = dp + sizeof "us-ascii" - 1)=='"')
- *bp = NULL;
- }
- else
- ! if (strlen (dp) >= sizeof "us-ascii"
- ! && isspace (*(bp =
- ! dp + sizeof "us-ascii" - 1)))
- ! *bp = NULL;
- ! result = !uleq (dp, "us-ascii");
- }
- else
- if (!(result = !uleq (bp, "text"))) {
- --- 422,440 ----
- while (isspace (*dp))
- dp++;
- if (*dp == '"') {
- ! if (bp = index (++dp, '"'))
- *bp = NULL;
- }
- else
- ! for (bp = dp; *bp; bp++)
- ! if (isspace (*bp)) {
- ! *bp = NULL;
- ! break;
- ! }
- ! if ((result = !uleq (dp, chset))
- ! && uleq (dp, "us-ascii")
- ! && uleq (chset, "iso-8859-1"))
- ! result = 0;
- }
- else
- if (!(result = !uleq (bp, "text"))) {
- ***************
- *** 457,463 ****
- for (dp = bp; istoken (*dp); dp++)
- continue;
- *dp = NULL;
- ! result = !uleq (bp, "7bit");
-
- free (cp);
- if (result) {
- --- 463,471 ----
- for (dp = bp; istoken (*dp); dp++)
- continue;
- *dp = NULL;
- ! result = !uleq (bp, "7bit")
- ! && !uleq (bp, "8bit")
- ! && !uleq (bp, "binary");
-
- free (cp);
- if (result) {
- *** ../mh-6.8.2/zotnet/mts.h Wed Aug 25 15:56:08 1993
- --- zotnet/mts.h Sat Sep 4 12:09:48 1993
- ***************
- *** 1,5 ****
- /* mts.h - definitions for the mail system */
- ! /* @(#)$Id: mts.h,v 1.3 1992/12/15 00:20:22 jromine Exp $ */
-
-
- /* Local and UUCP Host Name */
- --- 1,5 ----
- /* mts.h - definitions for the mail system */
- ! /* @(#)$Id: mts.h,v 1.4 1993/09/04 19:09:45 jromine Exp $ */
-
-
- /* Local and UUCP Host Name */
- ***************
- *** 84,89 ****
- --- 84,90 ----
-
- extern char *servers;
- extern char *pophost;
- + extern char *clientname;
-
-
- /* BBoards-specific variables */
- *** ../mh-6.8.2/zotnet/mts/mts.h Wed Aug 25 15:56:16 1993
- --- zotnet/mts/mts.h Wed Sep 1 13:55:11 1993
- ***************
- *** 81,86 ****
- --- 81,87 ----
-
- /* SMTP/POP stuff */
-
- + extern char *clientname;
- extern char *servers;
- extern char *pophost;
-
- *** ../mh-6.8.2/zotnet/tws/lexedit.sed Wed Aug 25 15:56:10 1993
- --- zotnet/tws/lexedit.sed Mon Oct 25 12:35:11 1993
- ***************
- *** 4,7 ****
- /^struct yysvf \*yyestate;$/,/^extern struct yysvf yysvec/d
- ! /^# define YYNEWLINE /,/^int nstr;/d
- ! /^while((nstr = yylook()/,/^if(yywrap()) /d
- /^case -1:$/,/^} return(0); }/c\
- --- 4,7 ----
- /^struct yysvf \*yyestate;$/,/^extern struct yysvf yysvec/d
- ! /^# define YYNEWLINE /,/^[ ]*int nstr;/d
- ! /^[ ]*while((nstr = yylook()/,/^[ ]*if(yywrap()) /d
- /^case -1:$/,/^} return(0); }/c\
-